How do I Z Order

0 favourites
  • 8 posts
  • 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!

  • 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..

  • Ok thank you man! I just needed to know about the folders I thought they might of do that.

  • 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 ...

  • 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 got it when mouse button clicked spawn bullet here:

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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

  • Ahh! Thank you! I didn't see that one ..

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)