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
28
S
15
G
10
Posts: 338
Reputation: 7,837

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,801

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
111
S
41
G
20
Posts: 1,586
Reputation: 19,046

Post » Thu Apr 02, 2015 4:58 pm

linkman2004

Great sample - THANKS !!
B
28
S
15
G
10
Posts: 338
Reputation: 7,837

Post » Mon Apr 13, 2015 4:06 pm

Hi ... sorry but where to change = CURRENTVERSION

Image

:-)
B
28
S
15
G
10
Posts: 338
Reputation: 7,837


Return to How do I....?

Who is online

Users browsing this forum: DJKeefy, mekonbekon, SputnikCZ and 8 guests