Wednesday, October 5, 2016

How to implement LocalStorage in Construct2

Step 1 is to check if a key exists. Fore example, "HighScore"

Steps 2, 3 and 4 :

The crucial part is Step 4. You need to wait for the "Get" result to come back before you can fetch tie ItemValue and use it - very un-intuitive. If you miss this step and just assigned your ItemValue at Step 3 then you'll be pulling your hair out wondering why LocalStorage seems to fail.




No comments:

Post a Comment