How to store player's life into a variable and generate a code
In this guide, you'll learn to, as the title says, store the player life into a variable. That is very useful, you can use it for lots of purposes. Here, I will explain how to generate a "Save Code", so the player will recive a code and he can resume the game where he left it, and with his life points.
In this guide, you'll learn to, as the title says, store the player life into a variable. That is very useful, you can use it for lots of purposes. Here, I will explain how to generate a "Save Code", so the player will recive a code and he can resume the game where he left it, and with his life points.
Sorry for my bad english, I'm spanish, so if you find any grammatical error, please, report it.
![Gumshoe :gumshoe:](./images/smilies/aa_icon_gumshoe.gif)
Example Trial
If you want to see how it's done, reply to this thread and I will add you as contributor. (But it's explained in the guide :p)
How to store the player life into a variable
Spoiler : How to store the player life into a variable :
That's pretty useful if you want to create a Save System (or a password system for a trial divided in parts) so the player can save the game and recive a code. Then, when he enters the code, he can resume the game, and he'll recive the same life points as before. Why? Because the number of life points are hidden (or encrypted) in this code, so the player won't modify it.
Spoiler : First: Encrypting the code :
Spoiler : Second: Decrypting the code :
![Smile :)](./images/smilies/icon_smile.gif)