Get help using Construct 2

Post » Fri Nov 29, 2013 7:12 am

so my game has many levels but i want a levels sheet so you can pick one but how can i make them all locked and unlock after the one before is complete and remember the levels unlocked when they restart the game
Posts: 13
Reputation: 226

Post » Fri Nov 29, 2013 11:43 pm

You can use a single global variable (default value 1) which you store via webstorage. When the player completed a level, it will unlock the next one. Meaning that 1 will be added to the variable.

Now in the level selection screen, you only allow to go to levels which are lower or equal to that variable's value. How this is actually achieved depends on the style of your level selection. If you had clickable tiles representing a level you could add an instance variable called "level" which would represent the level number obviously. Now you could compare this easily to the unlock variable.

Remember to store the variable in local storage with the webstorage object to keep the progress saved.
Posts: 1,051
Reputation: 8,173

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 2 guests