How do I create a new layer between other layers?

0 favourites
  • 7 posts
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • 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

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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?

  • 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.

  • It's ok, I'll go ahead and make the changes to my event sheets tonight.

  • 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

  • Thank you guys, in the future I'll actually use names for the layers as suggested.

  • 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

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)