How do I number layers?

Get help using Construct 2

Post » Sun May 22, 2016 6:23 pm

Hello,
I have 10 layers in a folder called levels and 10 layers in a folder called levels story.
When the player completes a level I want to jump to the next levels story layer.
How can I do this dynamically?
B
24
S
7
G
1
Posts: 200
Reputation: 2,495

Post » Sun May 22, 2016 7:46 pm

Set Layer Visible event. If it's a story where you dismiss layers which is what I'm imagining then you can just run a function where it sets different layers visible/invisible in order. There's probably many ways to do what you want here. You might want something else entirely though as this doesn't really relate to the subject 'how do I number layers?'
Last edited by plinkie on Mon May 23, 2016 12:20 am, edited 1 time in total.
B
46
S
15
G
73
Posts: 2,029
Reputation: 43,465

Post » Sun May 22, 2016 8:09 pm

By the way, you gave me an idea as to place them on top of the levels layer.
I will try it and respond back.
B
24
S
7
G
1
Posts: 200
Reputation: 2,495

Post » Mon May 23, 2016 4:44 am

keep in mind that when you are doing story mode or making a game type with this is that any variable that you have preivously saved for a layer will be there and it doesnt delete it self when switching layers. You might want to do layout instead if you choose to do so.
B
51
S
24
G
6
Posts: 391
Reputation: 7,820

Post » Mon May 23, 2016 10:06 am

Ok so I added a new layer on top of the game itself on each level instead of adding new layout which is logic.
Problem is that I want to make all other layers invisible while layer story is visible. With click they should all toggle.
I have different layers for levels though, so I want to use their names for visibility instead of their numbers to make it dynamic.
How to use layer's name in the 'set visible' action?

Update: Thanks for your help guys, now it works perfect!
B
24
S
7
G
1
Posts: 200
Reputation: 2,495


Return to How do I....?

Who is online

Users browsing this forum: Allardje, Rudi55, sublimate and 2 guests