How do I Save High Scores

Just started using Construct 2? Post your questions here

Post » Wed Dec 30, 2015 11:52 pm

So I've been wanting to add a simple scoring system that just saves and displays a single high score locally, similar to Flappy Bird. Every tutorial seems to be from 2012 and is using something called WebStorage which is apparently not supported anymore. If someone can just lead me in the right direction, it would really help. Thanks!

Edit: So after some more digging around I found this,
I tried it and the value it returns is always 4, no matter what score I achieve in my game.

Edit2: Okay so I can't post links or images, but it uses LocalStorage.

First it checks if the variable exists and then it gets it.
If it's missing, it sets it to 0.
Then once it gets the variable, it sets it to LocalStorage.ItemValue and displays it.
And finally, on start of layout, it checks to make sure it exists and displays it.

Edit3: After much playing around, I finally managed to get it to work!
Posts: 4
Reputation: 295

Post » Sun Jan 03, 2016 8:27 pm

Posts: 29
Reputation: 433

Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 2 guests