Z-Order for RPG like movement

  • Hey,

    I'm having a little trouble with Z-index. I'm working on the "field" part of a game that is RPG. Think of how you move around in old-school Final Fantasy games and the like. Problem is that I need to have access to detailed Z-index functions such as moving an instance's Z-index one down or one up, or placing it in front/behind of a specific object. For example, when the player is in front of a sign, I need to move the sign behind the player and when the player is behind the sign, I need to move the sign in front of the player. These kinda games have many, many objects that the player will walk by in only one layout and this is why objects need to be moved when needed.

    I am aware these options aren't available yet and were added to the to do list a long while back, but still haven't been added and I do believe that these are crucial features for a lot of games. Is there a work around for this? Or a plugin that I have missed? I have tried many things but nothing works how I want it to.

    Thank you.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello:) Maybe this might help! :)

    //Edit: Hehe, 3 at once:D

  • Take a look at this thread. newt's solution is simple and elegant.

  • System expressions -> For each (ordered). For the expression do the Y position of sprite.

    May want to put all the objects you want ordered in a family.

    Action: move to top of layer.

    edit: 3 posts at once, lol.

  • Thanks everyone for the help. I found a plugin which seems to work perfectly so far. newt's excellent example does pretty much the same as the plugin. Thank you all.

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