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?