Event only once

Get help using Construct 2

Post » Thu Apr 02, 2015 2:25 pm

Hi

How can I reset webstorage upon INSTALL
So new version will start from clean

Regards
Flemming
B
29
S
16
G
10
Posts: 344
Reputation: 7,974

Post » Thu Apr 02, 2015 2:55 pm

There is a "clear local storage" for the webstorage object, might be what you mean?
B
44
S
11
G
2
Posts: 1,181
Reputation: 6,816

Post » Thu Apr 02, 2015 3:31 pm

Store the current version number in local storage, check against a constant holding the current version number at game launch. If they're different, clear local storage and store the new version number. This ensures clearing the local storage after booting the new version for the first time. A quick example. Change the CURRENTVERSION to test.
Moderator
B
113
S
41
G
20
Posts: 1,586
Reputation: 19,096

Post » Thu Apr 02, 2015 4:58 pm

linkman2004

Great sample - THANKS !!
B
29
S
16
G
10
Posts: 344
Reputation: 7,974

Post » Mon Apr 13, 2015 4:06 pm

Hi ... sorry but where to change = CURRENTVERSION

Image

:-)
B
29
S
16
G
10
Posts: 344
Reputation: 7,974


Return to How do I....?

Who is online

Users browsing this forum: ilyaTyl, JMonkeyBoss93, LunchboxGames, SoldjahBoy and 10 guests