How do I preserve Zorder when using multiple layouts?

Get help using Construct 2

Post » Mon Apr 07, 2014 10:33 pm

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?
B
5
Posts: 17
Reputation: 259

Post » Mon Apr 07, 2014 11:53 pm

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.
B
33
S
7
G
8
Posts: 312
Reputation: 8,528

Post » Tue Apr 08, 2014 7:11 am

Message: Vavacav is not yet permitted to post plain text URLS (300 rep required). 1 URLS removed. Why?
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.
B
5
Posts: 17
Reputation: 259

Post » Tue Apr 08, 2014 7:15 am

Sorry, example below.
You do not have the required permissions to view the files attached to this post.
B
5
Posts: 17
Reputation: 259

Post » Tue Apr 08, 2014 1:58 pm

Vavacav wrote: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.
B
33
S
7
G
8
Posts: 312
Reputation: 8,528


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 9 guests