How do I get Z Order to work?

Get help using Construct 2

Post » Tue Feb 23, 2016 11:39 pm

I have a bomb, an animated sprite, that falls onto my hero, another animated sprite. When the bomb hits the hero, an explosion (another animated sprite) happens. The explosion is on a layer of its own, above the main layer. Its z-order is clearly shown on the Z Order Bar, it is the more foreground object on the most foreground layer. Yet when I run the layout the explosion is always behind the hero. Is this a bug or is there a specific way to get Z Order to work like it's supposed to?

I have read the Z Order page from top to bottom and there is nothing there that suggests this is anything but simple but this is driving me mad. Can somebody shed some light on this?

"To be yourself in a world that is constantly trying to make you something else is the greatest accomplishment."

Ralph Waldo Emerson
B
10
S
2
G
1
Posts: 56
Reputation: 1,300

Post » Wed Feb 24, 2016 12:38 am

You can make this in event sheet.

go to Z order tab in sprite event.
Select move to object. behind or in front .
B
6
S
2
G
1
Posts: 17
Reputation: 573

Post » Wed Feb 24, 2016 10:37 am

Thank you for your reply. I tried that and even that made no difference, but I finally figured out my error by thoroughly inspecting the debug screen.

When I had initially set the explosion spawn I did so on layer 0, not layer 1. I'm not yet used to typing a " to see the layer names droplist and I went with the default which was 0. It should have been 1 or "Main" :)

Noob error. A moment of inattention leading to hours of frustration!

"To be yourself in a world that is constantly trying to make you something else is the greatest accomplishment."

Ralph Waldo Emerson
B
10
S
2
G
1
Posts: 56
Reputation: 1,300


Return to How do I....?

Who is online

Users browsing this forum: Artcadev, jatoblendy and 46 guests