How do I Change Layout by index?

Get help using Construct 2

Post » Sat Sep 27, 2014 8:03 pm

Hello! I did a little searching here and at google's but didn't find a solution.
I have a "check point" layout that is responsible for redirecting the user to a level (retry or next). But I would like to use this same layout to any finished level. For this I keep record of the current level. The thing here is that I see only these options available as "actions": Go to previous/next layout, Go to layout (by name), Restart layout and Goto layout "specific layout". Is there any way to go to a layout by its index number?

As I am writing this I am thinking about making a translate table between a number and a text. What do you think? How do you do this kind of thing?

Thanks!
B
24
S
4
G
1
Posts: 177
Reputation: 1,827

Post » Sat Sep 27, 2014 8:07 pm

I implemented something similar in my tutorial, maybe you want to look at how it's done by "manual indexing". Look at Line16 and Line17, as well as how I named the layouts. Cheers!
B
28
S
8
G
4
Posts: 553
Reputation: 4,924


Return to How do I....?

Who is online

Users browsing this forum: Lordshiva1948 and 68 guests