Help! LocalStorage no work

Get help using Construct 2

Post » Wed Jul 20, 2016 8:29 am

Hello everyone!
I can not operate the local storage.
I followed all the tutorials and discussions on the forum ... but nothing.

This is my setup, the variable during the game responds well, but when for example the player dies and the game begins again the variable is reset to 0, and saving is noexistent.

where am I wrong?


Image


Thanks Nicola
B
5
Posts: 3
Reputation: 233

Post » Wed Jul 20, 2016 9:11 am

upload your whole capx so we can see what really is wrong
B
79
S
31
G
7
Posts: 148
Reputation: 9,179

Post » Wed Jul 20, 2016 1:24 pm

Keep in mind that it takes time to get the value, so you need to delay anything that uses that value until after On exists or On missing has run.
ImageImageImage
B
71
S
22
G
247
Posts: 3,753
Reputation: 137,552

Post » Wed Jul 20, 2016 3:09 pm

What blackhornet said. You can move events to be sub events of a required "get" in order to make sure they are executed in proper sequence... or add a small wait timer for like 0.2 seconds. Wait timer may be prone to fouling at times though depending on whatever else you have going on.

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
84
S
34
G
40
Posts: 3,032
Reputation: 30,499

Post » Tue Jul 26, 2016 3:16 pm

Thanks to all for the answers
I managed to solve by following tips by SoldjahBoy... was enough to add a little waiting time between the variable setting and saving

Thanks again :)
B
5
Posts: 3
Reputation: 233


Return to How do I....?

Who is online

Users browsing this forum: The Mnk and 5 guests