Beat'em Up style character depth control

0 favourites
  • 3 posts
From the Asset Store
A very simple to set up ZElevation based depth of field system for your game. Fully commented.
  • Hi friends,

    I'm trying to make the character come to the front by using layers and/or Z layering, but I got a problem.

    I got my main character and several enemies, but they're all the same. Same object, just copied several times, in order to preserve the AI.

    Now, my code says that when player.y is above or below enemy.y it changes it's position, coming to a front position or behind it.

    But this only works with one of the enemies: the first one created (so, the first instance).

    Do I have to make different objects for each enemy, even when they're all the same? Can't I clone them?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think a "For Each" (Enemy) on the condition that handles Z ordering should sort it.

  • For some reason, it doesn't work. I'm thinking on multi-layering the ground so when the character moves along them, they change their Z position... It's a little bit too complicated but I can't find another way.

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