How do I Go to "Next" Layout?

Get help using Construct 2

Post » Thu May 15, 2014 9:52 am

Hi Guys

Just wondering if there is a way to go to the next layout in line instead of specifically putting down its name?

Thank you in advance!
B
43
S
21
G
9
Posts: 142
Reputation: 8,928

Post » Thu May 15, 2014 10:41 am

Got to layout by name.

Name your layouts like:
Level1
Level2
Level3 etc


variable LVL = 1

On the end of a level, increase LVL + 1, then go to layout (by name) "Level"&LVL
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,562

Post » Fri May 16, 2014 10:13 am

Thank very much for the help :)

I was hoping there was a more automated way of handling this.

When I create levels, I often shuffle their order around if the difficulty doesn't feel right where it is etc.

This means that every time I "shuffle", I have to change the "goto layout" events in each of the levels to reflect the new order (as well as the level names).

Any ideas on how to achieve this, without having to change the code every time?

Thank again!
B
43
S
21
G
9
Posts: 142
Reputation: 8,928

Post » Fri May 16, 2014 12:30 pm

Ninjadoodle wrote:Thank very much for the help :)

I was hoping there was a more automated way of handling this.

When I create levels, I often shuffle their order around if the difficulty doesn't feel right where it is etc.

This means that every time I "shuffle", I have to change the "goto layout" events in each of the levels to reflect the new order (as well as the level names).

Any ideas on how to achieve this, without having to change the code every time?

Thank again!



Yup, simply number your layout names smart.

For instance, say you have Level1, Level2, Level3 Layout.
And you determine, that Level2 might function better as Level3, and Level3 vice versa.

Then rename layout Level3 to a temporary name like LevelX.
Rename layout Level2 to Level3, and rename LevelX to Level2.

:)
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,562

Post » Tue May 20, 2014 12:02 pm

I started using your numbering technique and the "Level"&LVL to goto the next level and it definitely makes things much easier.

Thank you again for your help :)
B
43
S
21
G
9
Posts: 142
Reputation: 8,928


Return to How do I....?

Who is online

Users browsing this forum: SputnikCZ and 3 guests