How do I resume game progress ?

Get help using Construct 2

Post » Fri Nov 06, 2015 3:29 pm

Hello everyone ,
i have a little problem . one of my events is not working , "when "Sprite73" is clicked" --- Go to layout "LevelCleared" (LevelCleared is an attribute and it's value is 0 it go up by 1 every level)
when it come to testing , when i click on Sprite73 nothing happen . Do you have a fix for this ? or another ideas to make the player continue in his last level ?
level name are like that : 0 , 1 , 2 ...
Image
B
17
S
2
Posts: 21
Reputation: 1,504

Post » Fri Nov 06, 2015 3:42 pm

You mean LevelCleared a global variable number and your layouts are numbered without anything else?

Then it would be goto layout by name: LevelCleared (without " around it)

If your layouts are called Layout 1, Layout 2, etcetera (the way Construct2 names them automatically)

Then it would be goto layout by name: "Layout "&LevelCleared (don't forget the space after Layout)
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 Nov 06, 2015 3:44 pm

fixed it , the trick was to make another attribite which is a text not a number
LevelsPassed: is a text
LevelsCleared: is a number
so it become like that :
when level is switched for example : add 1 to LevelsCleared
Every Tick : set LevelsPassed to LevelsCleared
When mouse is clicked on Sprite 73 : go to layout "LevelsPassed"
I hope someone else find this useful . Close the topic please .
Image
B
17
S
2
Posts: 21
Reputation: 1,504

Post » Fri Nov 06, 2015 3:44 pm

LittleStain
Oh sorry , didn't saw your reply . Thanks anyway .
Image
B
17
S
2
Posts: 21
Reputation: 1,504

Post » Fri Nov 06, 2015 3:51 pm

BlueSn0w wrote:fixed it , the trick was to make another attribite which is a text not a number
LevelsPassed: is a text
LevelsCleared: is a number
so it become like that :
when level is switched for example : add 1 to LevelsCleared
Every Tick : set LevelsPassed to LevelsCleared
When mouse is clicked on Sprite 73 : go to layout "LevelsPassed"
I hope someone else find this useful . Close the topic please .


Like explained above, no need for the LevelsPassed, you can just set the goto layout to Levelscleared without "
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 Nov 06, 2015 3:53 pm

it's without the "" from the start ...
like i said this didn't work for me , umm i wonder why
Image
B
17
S
2
Posts: 21
Reputation: 1,504

Post » Fri Nov 06, 2015 3:59 pm

Ok, first time I noticed this..

Goto layout by name : ""&LevelCleared does work, but just LevelCleared doesn't..
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 Nov 06, 2015 4:10 pm

LittleStain wrote:Ok, first time I noticed this..

Goto layout by name : ""&LevelCleared does work, but just LevelCleared doesn't..


as i said in the main post , their names are 0 , 1 , 2 , 3 , 4 ... without the default "Layout" thing
and LevelsCleared is 0 by default
But it's working now ( with LevelsPassed and LevelsCleared ), so you don't need to worry
Image
B
17
S
2
Posts: 21
Reputation: 1,504

Post » Fri Nov 06, 2015 4:11 pm

ahh i see now , i'll try it
Image
B
17
S
2
Posts: 21
Reputation: 1,504

Post » Fri Nov 06, 2015 4:13 pm

Yup , it work like that . Thanks very much . i'll need that spare event from my limited 100 :)
Image
B
17
S
2
Posts: 21
Reputation: 1,504

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 6 guests