Beat'em Up style character depth control

Get help using Construct 2

Post » Mon Jun 23, 2014 2:51 pm

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?
B
5
S
1
Posts: 34
Reputation: 512

Post » Mon Jun 23, 2014 3:39 pm

I think a "For Each" (Enemy) on the condition that handles Z ordering should sort it.
B
15
S
4
G
1
Posts: 286
Reputation: 1,988

Post » Tue Jun 24, 2014 7:23 am

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.
B
5
S
1
Posts: 34
Reputation: 512


Return to How do I....?

Who is online

Users browsing this forum: Hadyurik, marc254, Yahoo [Bot], Zav and 8 guests