> I need to use webstorage for a very simple "Last level reached" save. After completing a level, the game will go back to the level select screen with the new level unlocked, kind of like in the super mario games. Ashley referenced it being possible in this tutorial: https://www.scirra.com/tutorials/526/ho ... -savegames
>
> I cant really find any tutorial or anything on this and Im having a real hard time understanding it. My head feels like exploding trying to make sense of it and Im staring to get frustrated, can anyone please help or something? <img src="{SMILIES_PATH}/icon_cry.gif" alt=":cry:" title="Crying or Very Sad">
> I need help. Thanks.
>
You don't really need any tutorial for this. Let's see..
Create a variable (something like 'savegame') and give it a 0. So, no saves yet.
You just need to add 1 to this variable any time that a level begins.
And in the same event, use the webstorage "set local value".
Create whatever key and set the 'savegame' variable to the 'value'.
Now you have the data that you want.
If you have any questions, let me know <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">
Wow thanks! I was having trouble understanding it, but you cleared it up! Will this work using an array for level select/unlocking levels?