How do I preserve Zorder when using multiple layouts?

  • My main character is composed of parts, all on the same layer, with correct Zorder. I load him on one layout, with a HUD, and an event sheet brings me to a new layout. The Zorder is not preserved in the new layout.

    All initial objects are Global. All layers are named the same between both layouts. Is there a quick fix, or do I have to manually reset the layout on the start of new layout?

  • Sorry, I guess I'm a little confused. Either you have the sprite objects already in the layout and Z-order will be preserved, or you load up the sprite objects using Create Object and based upon order of creation, the Z-order is preserved. So, I guess I'm not getting what you mean.

  • If you check out the Zorder in Layout 1, it's Blue Red Yellow, front to back. But regardless of the Zorder in the layout 1, it always shows up in layout 2 as Yellow Red Blue, front to back. You shouldn't see yellow at all. Even if I reorder my code on the general Event Sheet, it still doesn't effect the Zorder on Layout 2.

  • Sorry, example below.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sorry, example below.

    On Project Properties, I set First Layout = Layout 1. On esGeneral, I added "Move to Top Layer" for each piece, so:

    Every Tick:

    C->Set Position

    C->Move to Top

    A->Set Pos

    A-> Move Top

    B->Set Pos

    B->Move Top

    And it works like you want.

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