Hi! I got a problem, I want to save the global variable highscore even exiting the app and I When I enter the game again show me the highscore I did before. I'm using localstorage to save the highscore. I using too Cocoon.io for the apk.
Thank you!
Use this event:
This event is taking place in a single layout (example)
Add 1 Global Variable named "HighScore"
Note: In the event On item missing (We will create a LocalStorage key named "Highscore")
On start of layout..
---->Local Storage Check for item ("Highscore")
On Item found ("Highscore")
- ---->Set value Highscore to (LocalStorage.Itemvalue)
On Item missing ("Highscore")
------>Set LocalStorage Item ("Highscore") to 0
On end of layout
------>Set LocalStorage item ("Highscore") to Highscore