Z order issue

Get help using Construct 2

Post » Tue Aug 13, 2013 7:59 pm

https://www.dropbox.com/s/3rw44umhr3sxe3t/Zelda.capx

r139

Newbie Here. I have a quick question about Z ordering. It's also my first question asking for help. (Tell me if the dropbox file doesn't work.

(I'm recreating Zelda, to learn the ropes.)

I'm trying to debug a small issue with Z ordering. I can easily use a work around, but I want to understand if I'm doing anything wrong, or how the Construct code is working, so I can better understand it for the future.

The project is cut down a lot in an attempt to debug. There is only two layouts to pay attention to. (Main and Map22) and two event sheets (esMain and esMap22)

Go to Main and preview it. (I'm using Chrome)

What I expect: You shouldn't see the three hearts on the bottom of the screen. The Z order tells me that FullBlack should be on top of it.

Now, if you disable "Go To: Map22" in esMain, it displays how I think it should.

So, by including that second layout, it screws up my Z order on the first layout?

Thanks for you help.
B
5
Posts: 17
Reputation: 259

Post » Tue Aug 13, 2013 8:45 pm

Was tricky but I got there eventually. It's because your first layout, the majorly black one, has all the assets set to Global so when it switches to Map22, Main is appearing over it. Both layers are displayed but you can see the hearts now because FullBlack is not set to Global and disappears upon loading Map22.

To fix: set everything that appears on Main, that you do not want to see on Map22, to Global=No on the left-hand side options.
B
47
S
17
G
81
Posts: 2,223
Reputation: 48,093

Post » Tue Aug 13, 2013 9:14 pm

Thanks for the replay, but FullBlack IS set to global already. And it covers some things (Menu, MapCoordinates, Rupee Count) but not the hearts...
B
5
Posts: 17
Reputation: 259

Post » Tue Aug 13, 2013 9:31 pm

Set the active layer on Map22 to Background
B
47
S
17
G
81
Posts: 2,223
Reputation: 48,093

Post » Tue Aug 13, 2013 9:45 pm

Just mess around with the layers until you get what you want. I'm not sure when you want the hearts to appear and in which layout.
B
47
S
17
G
81
Posts: 2,223
Reputation: 48,093

Post » Wed Aug 14, 2013 7:54 am

I had a few issues with the Z layers and global's, rather than working out what was causing it i just

On start of layout
Move Global to Highest layer
Move Global to Top
B
10
S
2
G
1
Posts: 77
Reputation: 1,278


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 30 guests