How do I use Layout (by name)

Get help using Construct 2

Post » Fri Jan 27, 2017 1:57 pm

Basically, I want to change from Layout 1 to Layout 2 to Layout 3 etc,

and I know this is possible with 'Layout (by name)', but for the love of god I can't find out how to exactly.

I haven't been using Construct 2 for almost 2 years and I know there's a tutorial about it somewhere, but really can't find it after an hour of searching..

Any help?

Thanks
B
12
S
1
Posts: 28
Reputation: 978

Post » Fri Jan 27, 2017 2:10 pm

go to layout "name of layout here"
Image
B
30
S
9
G
3
Posts: 171
Reputation: 3,329

Post » Fri Jan 27, 2017 2:17 pm

Bedsidesam92 wrote:I haven't been using Construct 2 for almost 2 years


I don't think that part is right, but to the point layout (by name) is just were you change to a layout by the name of it. Its useful when you want to lower down the amount of code.

In a game I'm making for college it has different levels, so if I name all my levels layouts the same as what it shows inside the game I can use the layout (by name) to save lots of time.



Image

As your layouts are layout1 layout2 and layout3 (I would recommend changing them) you could just have a global variable storing what number layout they should be on then do in the box
Code: Select all
"Layout" & layoutnumber


If you get confused feel free to ask more as I'm bad at explaining things.
B
8
S
2
Posts: 22
Reputation: 606

Post » Fri Jan 27, 2017 2:28 pm

Additional tip:
Just delete everything in the 'name field'.
Then type the character "

Construct will give you all layouts by name in a drop-down menu. Just choose. Safer then typing then name.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Fri Jan 27, 2017 2:51 pm

@Ben Wilson, Thanks, that is exactly what I was looking for!
B
12
S
1
Posts: 28
Reputation: 978


Return to How do I....?

Who is online

Users browsing this forum: guannstar, tankhedgehog and 15 guests