create object z order is changed

All closed bug reports are moved here.

Post » Wed Apr 05, 2017 11:04 am

So I'm making blood splatter, the z-order is correct for the one on-screen I am testing, but when creating it during the game, it's given the top z-oder, so it appears above all my enemy sprites instead of below.

Is this is a bug, or is it the way HTML5 works and something we have to work around?
B
4
S
2
G
5
Posts: 346
Reputation: 2,417

Post » Wed Apr 05, 2017 12:31 pm

May I know did you create a new instance on runtime (preview) or arranged them before preview? As far as I know, when you create a new sprite or spawn a new sprite, it is always at the top of it's layer. Of course, unless that particular instance was already arranged it's Z order, but it does not mean new instances of this object will have the same Z order arrangement as the initial one.

You have to manually change it's Z order after it is spawned from the event sheet.
B
40
S
9
G
5
Posts: 177
Reputation: 6,805

Post » Wed Apr 05, 2017 1:31 pm

Construct 2 creates objects at the top of the layer by design, and Construct 3 works the same. This sounds like it's working as intended, and since no other reproduction steps or project are provided, closing.
Scirra Founder
B
395
S
232
G
88
Posts: 24,368
Reputation: 193,746

Post » Wed Apr 05, 2017 2:42 pm

Ah, figured it out. Z Order, move to object, select floor tile which is always below active sprites. Seems to sort it, so yeah, working as intended I guess.

Maybe the "Move to object" needs renaming to be clearer?
B
4
S
2
G
5
Posts: 346
Reputation: 2,417


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 0 guests