How do I appear in front of another object

0 favourites
  • 5 posts
From the Asset Store
This is a single chapter from the "Construct Starter Kit Collection". It is the Student Workbook for its Workshop.
  • Making a platformer and this tree is in front of my player every time I walk by it. Both are on the same layer. How do I get the player in front of it?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • sorry i 've answered but the way scirra disconnect users from this forum is very frustrating because we always loose all text we have written !

    So again considering "player" is the player sprite ...

    1?) in the layer select the player sprite (left click) and (then right click) -> Z-order move to top of layer ...

    2?) in code "player : move to top of layer"

    You should have to use 2?) if the tree is a object create by code in this layer or move to this layer using code because doing that it is always display in front of all others existing objects in this layer.

  • Thanks naelin!

    I used the first example and it worked perfectly!

    Thanks again.

  • incase your wondering how it happened... you probably put the tree in the layout after the player object. Objects are ordered on Z in the order they were created

    To make sure your player is always "on top" of everything else on the same layer move the player object to the top of the Z order every tick

  • Thanks aridale, I'll keep that in mind.

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