How do I check the current layout?

Get help using Construct 2

Post » Fri Jul 10, 2015 11:04 pm

Hi guys, I want to make a save system.

When the player get the star, the system will check what is the current stage and check it automatically.

I think I can do the save function, but I don't know how to make the system check what is the current layout ..

Is there any function to check the current layout name?

Thanks
B
5
S
1
Posts: 60
Reputation: 495

Post » Fri Jul 10, 2015 11:13 pm

you can use the system expression"LayoutName"
Image Image
B
22
S
13
G
135
Posts: 871
Reputation: 70,320

Post » Sat Jul 11, 2015 2:04 am

Sorry, but I can't find this expression.. I don't want to goto a layout by name.. I just want to check what is the current layout that the player is .
B
5
S
1
Posts: 60
Reputation: 495

Post » Sat Jul 11, 2015 2:10 am

As MadSpy said, the expression LayoutName will return the name of the current layout, which you can see in the manual.
Moderator
B
113
S
41
G
20
Posts: 1,586
Reputation: 19,116

Post » Sat Jul 11, 2015 2:25 am

Ok @linkman2004 thank you !

But could you just give me an example of a way to use this expression?


Thanks :D
B
5
S
1
Posts: 60
Reputation: 495

Post » Sat Jul 11, 2015 6:38 am

Example:

Text set text : LayoutName
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 Jul 11, 2015 1:37 pm

Thanks @LittleStain

How can I compare something like : IF THE PLAYER IS IN LAYOUT 1 > DO SOMETHING?
B
5
S
1
Posts: 60
Reputation: 495

Post » Sat Jul 11, 2015 1:44 pm

@caiocesar

System->Compare 2 Values->LayoutName = "Layout 1"
Vote for all the Construct 2 games on Steam Greenlight - Find them here
B
33
S
9
G
7
Posts: 450
Reputation: 6,778

Post » Sat Jul 11, 2015 1:57 pm

Thanks @OddConfection :D
B
5
S
1
Posts: 60
Reputation: 495


Return to How do I....?

Who is online

Users browsing this forum: plinkie, rayolf, SashikLV and 8 guests