Need confirmation that I'm using LocalStorage correct.

Just started using Construct 2? Post your questions here

Post » Thu Jun 11, 2015 8:10 pm

I switch to LocalStorage plug-in from WebStorage because WebStorage wasn't saving my high score variables anymore for this game. The thing is, I don't know if I encounter a bug when I updated from r200-r206. Here is the load down of what happen:
Created project with r200
WebStorage worked
Update Construct to r206
Found out the hard way that WebStorage doesn't work anymore for whatever reason
Learned that LocalStorage replaces WebStorage
Delete WebStorage and added in LocalStorage with events
Still can't save variables.
What is going on? I will include a link of a stripped down version of my game with LocalStorage set up.
https://onedrive.live.com/redir?resid=e ... 2cautosave

I like to point out that I recently saved an older project that uses WebStorage in r206 and it saves that game's high scores just fine and dandy.
B
2
Posts: 2
Reputation: 154

Post » Thu Jun 11, 2015 9:44 pm

In Event 5 you should be loading the value into the high score variable.
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,650

Post » Fri Jun 12, 2015 1:13 am

Thanks but it's still a no go... (tested as a html 5 page and nw.js)
What I did to event 5 was I change from a LocalStorage: Set Item "rocket_high_score" to LocalStorage.ItemValue to a System: Set Value Variable: "rocket_high_score" to LocalStorage.ItemValue. Is that the correct way?
B
2
Posts: 2
Reputation: 154


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests