Goto layout by name

Get help using Construct 2

Post » Thu Jun 25, 2015 12:32 pm

What is the difference between "Go to layout" and "Go to layout by name" and is one quicker than the other?
B
9
S
3
Posts: 146
Reputation: 1,150

Post » Thu Jun 25, 2015 1:26 pm

I think it is the same thing... but if you have a lot of layouts perhaps it is most easy to use this command (layout by name) instead of using the other and waste your time trying to find a layout to select.
B
5
S
1
Posts: 60
Reputation: 495

Post » Thu Jun 25, 2015 1:28 pm

The difference is that on go to layout you choose one single layout on go to layout by name you can make something like:

go to layout by name choose(layout1, layout2, layout3, layout4)

which makes it go to a random layout. You can make other things as well.

So there's no difference in speed or performance but a huge difference if you want to include other things like variables for example.
Last edited by Anonnymitet on Thu Jun 25, 2015 1:29 pm, edited 1 time in total.
B
52
S
22
G
12
Posts: 725
Reputation: 11,716

Post » Thu Jun 25, 2015 1:29 pm

You can also do some string manipulation and for example automate some actions.

Let's say you have a couple of layouts named "Level1", "Level2", "Level3", etc...
You can use the "Go to layout by name" action and go to "Level" & MyVariable and have some common function/action to go through different layouts.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
284
S
109
G
91
Posts: 7,317
Reputation: 87,483

Post » Thu Jun 25, 2015 1:30 pm

I believe @Kyatric and I wrote the same thing at the same time x)
B
52
S
22
G
12
Posts: 725
Reputation: 11,716

Post » Thu Jun 25, 2015 1:33 pm

Ohh yes, I forgot that we can do some string manipulation with it :D
B
5
S
1
Posts: 60
Reputation: 495

Post » Thu Jun 25, 2015 1:54 pm

Understood
Thanks all
B
9
S
3
Posts: 146
Reputation: 1,150


Return to How do I....?

Who is online

Users browsing this forum: Rudi55 and 5 guests