Hi, can someone be nice and help me to solve this issue please?
As you can see on the image, if the sprite step on the other same sprite i want to move the sprite with the smaller Y value behind the other sprite (in layer or z order)
But i can´t compare something like... "sprite on collision with sprite" and "sprite.Y is less than sprite.Y", move sprite to layer or z order....because it will do nothing.. i can´t compare y between same objects being collided
Develop games in your browser. Powerful, performant & highly capable.
You don't compare it on collision but rather like all the time. You put all relevant objects in a family and say for each family order by family.Y move to top/bottom.
I´m doing wrong??
Without the 2 extra conditions, just the for each and for the action : move to top OR move to bottom depending on whichever has the desired effect, can't remember from looking what Y ascending does.
Thank you very much, I can't believe how simple it was, but I could never have done it without your help, thanks =)