How do I Z Order

Get help using Construct 2

Post » Wed May 27, 2015 10:45 am

Hello guys I'm having an issue with the Z order basically I have a (Bullet) (the player that shoots that bullet) and the (map)

When My character shoots the bullet goes behind the map... I did do the bullets Z bring to front several times but it's still behind it when I shoot... Also I brought the Layer where the bullet is to the top still no result. My question is can the folders affect that? as I have a background (MAP) In Objects section On top can this cause the bullet go behind as the bullets folder is at the bottom?
Thank you!
B
8
S
3
Posts: 120
Reputation: 989

Post » Wed May 27, 2015 10:53 am

Folders have nothing to do with it, they are only meant for easy ordening inside the editor..

It could be you are creating/spawning the bullet on a layer behind the layer the map is on..
You could also check if the bullet is visible when spawning/creating..
Or if there are any conflicting events setting the z-order/layer-order..

Without seeing your capx it's hard to tell..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed May 27, 2015 2:42 pm

Ok thank you man! I just needed to know about the folders I thought they might of do that.
B
8
S
3
Posts: 120
Reputation: 989

Post » Wed May 27, 2015 3:55 pm

@LittleStain But if my Bullet is outside the layout so when it spawns it doesn't know what layer to go in ? sorry im terrible with the Z Orders... Thanks fro helping me with this ...
B
8
S
3
Posts: 120
Reputation: 989

Post » Wed May 27, 2015 4:11 pm

When another object spawns the bullet it will be spawned highest in the z-order of the layer the spawning object is on..

Why would your bullet be outside the layout?
If you are only setting it's position instead of spawning/creating (can't see a reason to do that) the bullet will remain on the layer it originally is (in the editor), unless you change it's layer in events..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed May 27, 2015 4:50 pm

I got it when mouse button clicked spawn bullet here:
Image
B
8
S
3
Posts: 120
Reputation: 989

Post » Wed May 27, 2015 4:53 pm

you are spawning the bullet on layer 0 layer 0 being the bottom layer you have, change the layer 0 spawn to 2 or 3 that you have on top and it will be fixing the problem :)
B
78
S
23
G
69
Posts: 1,353
Reputation: 44,005

Post » Thu May 28, 2015 10:00 am

Ahh! Thank you! I didn't see that one ..
B
8
S
3
Posts: 120
Reputation: 989


Return to How do I....?

Who is online

Users browsing this forum: worm1, Yahoo [Bot] and 23 guests