How do I Unlock Next Levels

Get help using Construct 2

Post » Fri Oct 23, 2015 9:25 am

When my game is running my levels get unlocked just fine even if I switch between layouts such as main menu, howto play etc whenever I goto level selection layout all the level I have unlocked are there but when I exit my game and re open it my levels are locked again?
B
10
S
1
Posts: 93
Reputation: 722

Post » Fri Oct 23, 2015 9:41 am

When the game is reatarted all variables are set back to their original value, it's like starting the game for the first time..

To "solve" this you should use local storage and/or savegames to store the state the game is in..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Fri Oct 23, 2015 5:31 pm

I'm using webstorage but how do I check if my key exist after I restart @littlestain
B
10
S
1
Posts: 93
Reputation: 722

Post » Fri Oct 23, 2015 7:07 pm

If you are using webstorage, you use the condition: webstorage key exists

If you are using local storage you use the action: check item exists
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sat Oct 24, 2015 1:38 am

@littlestain if webstorage key exists than what action to load it?
B
10
S
1
Posts: 93
Reputation: 722


Return to How do I....?

Who is online

Users browsing this forum: Anna Nehves Br, divsyntax, volumetv and 15 guests