Help Please!

Get help using Construct 2

Post » Sat Aug 04, 2012 9:26 pm

I am trying to make my game have a save level on completion feature, and a level select title screen that you can only select beaten or unlocked levels, if you can help please and thanks, if you die in my game on level 8 you get sent all the way back to level 1, its horrible.
B
2
Posts: 1
Reputation: 302

Post » Sat Aug 04, 2012 9:46 pm

You should create global variables. So when i complete level 1 set glabal variable to 1. If i beat level 2 set global variable to 2. If global variable is set to 2 unlock level 3. You would have to come up with a system that unlocks a level though. I did it the cheap way. I had all my level numbers off screen and when you beat a level i told the number to spawn in the location of the lock sprite. When the number touched the lock sprite it would destroy it lol. I'm sure there's a smarter way of doing it though.
B
22
S
5
G
3
Posts: 194
Reputation: 5,855

Post » Sun Aug 05, 2012 6:39 am

I use an array to store 1 at the location of the level number.
Then I check if level number - 1 in that array is = 1.
If yes, then I set the button to allow players into the next level.
B
36
S
10
G
6
Posts: 948
Reputation: 11,101

Post » Sun Aug 05, 2012 11:09 am

As already said, store a value for each level and check that when showing/clicking the buttons, but I'd recommend using WebStorage so progress will be saved even when you exit the game.

WebStorage Manual
Vote for all the Construct 2 games on Steam Greenlight - Find them here
B
27
S
7
G
4
Posts: 314
Reputation: 4,928

Post » Sun Aug 05, 2012 11:40 am

I don't think he means when he reloads the game..
B
36
S
10
G
6
Posts: 948
Reputation: 11,101

Post » Sun Aug 05, 2012 11:54 am

Whether or not he meant on reload, it's still worth knowing and now he has that option if he wants it.
Vote for all the Construct 2 games on Steam Greenlight - Find them here
B
27
S
7
G
4
Posts: 314
Reputation: 4,928

Post » Mon Aug 06, 2012 2:27 pm

http://www.scirra.com/arcade/addicting-puzzle-games/1112/twingo-parking

i can show you how if this is what you think, i can`t do it without save and load button, after you close browser and click load your levels will be unlocked again. check it and write
B
10
S
3
G
3
Posts: 54
Reputation: 3,317


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, Popcan151, Skebab and 14 guests