blackhornet Okay it may be a bit complex to explain but here goes......
I have a game where you collect gems using a player. These gems can then be used to buy different characters. If you can afford the character then it is highlighted in black and white so you can see the character, but you're not able to click on it (only the coloured ones work when clicked on). If you have enough money/gems then the player is in colour and therefore available to purchase.
I used an instant variable (called 'upgrade') in each character for the following purpose. when the person click on a coloured character (one that is available for purchase) 1 is added to the instant variable. If the instant variable is 1 then the player REMAINS in colour. Without this instant variable after restarting the game and going back into the upgrade shop the payer is no longer highlighted since you dont have enough money unless the variable is 1.
So i want to make a webstorage that will remember the instant variable for when the person closes the app and opens it again.
I hope this made sense thank you