help me, Unlock levels and save them

Get help using Construct 2

Post » Mon Jun 26, 2017 1:03 am

brothers i'm a novice

Can you help me to unlock the levels after finishing the previous level, and also save this information so that the players finds them after restarting the game

thank you in advance
B
5
S
2
Posts: 7
Reputation: 439

Post » Mon Jun 26, 2017 1:09 am

Unlocking levels is a simple global variable, can be a bool, true/false etc. When tutorial is complete, set level 1 locked to false. When level 1 is complete, set level 2 locked to false etc. To save this information you can use system Save feature which will Save the state of the game at that point, essentially saving what is unlocked. If you're saving scores and things you can look into the local storage style save system.
B
47
S
17
G
81
Posts: 2,230
Reputation: 48,107

Post » Mon Jun 26, 2017 1:18 am

Its possible to have any example?
B
5
S
2
Posts: 7
Reputation: 439

Post » Mon Jun 26, 2017 9:01 am

Well there is an example here which has level unlocks and ratings : https://www.scirra.com/tutorials/311/level-select
To then save the game you can follow this : https://www.scirra.com/tutorials/526/ho ... -savegames
B
47
S
17
G
81
Posts: 2,230
Reputation: 48,107

Post » Mon Jun 26, 2017 12:19 pm

You can also use local storage to save only the variables you need, like level unlock, or an array with score/star values.

https://www.scirra.com/manual/188/local-storage
Like my work? Fallow me on social media, and see my games on the arcade.
B
7
S
5
G
9
Posts: 298
Reputation: 5,367


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 22 guests