How do I create a new layer between other layers?

Get help using Construct 2

Post » Thu Jun 09, 2016 10:04 pm

Hi,

I made a game with 4 layers (0 - 3) and now I want to create another layer above layer 0. The problem is the existing layers are assigned IDs, i.e layer 0 is 0 layer 1 is 1 etc. Now if I create a new layer above layer 0, it's assigned the ID number 1 and replaces the the previous layer's ID number which is then moved up and assigned ID number 2. This messes things up as the game is set to using previously set layer IDs. Does that make sense?

Is there a way to manually assign IDs to layers?

Thanks,
Dan
B
8
S
1
Posts: 65
Reputation: 1,108

Post » Thu Jun 09, 2016 10:36 pm

Doesn't the engine use the ID to determine the order of layers? Would it in any way hamper with the functionality of your game if you changed it to identify layers by name instead?
B
7
S
1
Posts: 12
Reputation: 401

Post » Thu Jun 09, 2016 10:43 pm

My issue is that I don't want to have to go through all the events and make the changes. It'd be a nightmare.
B
8
S
1
Posts: 65
Reputation: 1,108

Post » Thu Jun 09, 2016 10:56 pm

It's ok, I'll go ahead and make the changes to my event sheets tonight.
B
8
S
1
Posts: 65
Reputation: 1,108

Post » Fri Jun 10, 2016 6:39 am

every time you insert a new layer and move it to up-down
all layers will automatically assigned a number
from bottom to top 0,1,2,3,4
===
i know your problem is
in your game their might some special actions like
something on layer 1 or 2 or 3 or 4
====
best way is always give them names to layer
0= BG
1=main
2=HUD etc
you can create any new layer and insert it
it will not effect to your conditions or action
Image
B
64
S
39
G
45
Posts: 647
Reputation: 32,204

Post » Fri Jun 10, 2016 12:17 pm

Thank you guys, in the future I'll actually use names for the layers as suggested.
B
8
S
1
Posts: 65
Reputation: 1,108

Post » Fri Jun 10, 2016 3:47 pm

You can also re-order layers in the layout menu by moving them up and down - but yes if you've used the numbers then you're kind of stuck with the ordering you have. As already mentioned and confirmed - using a string value is better because you can move things around and insert as many new layers as you like without messing anything up.

Don't worry, we've all been here - and if you're like me, you'll do it more than once! lol

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
83
S
34
G
40
Posts: 3,032
Reputation: 30,474


Return to How do I....?

Who is online

Users browsing this forum: blue visionary and 26 guests