I have zombies that wander a 2d platformer. What I am trying to do is cause the zombies to change their animation to a jump/reach animation when they are under the hero.
I have it set up so the zombies are always moving toward the player, but after they reach a certain point if the Y coordinates are in the right range I want them to start jumping/reaching. Does this make sense?
Basically, I don't know how to write out the coordinates so that they are within a range. Like, Player.X"Within two X coordinates relative to the player"
What about the distance expression?
Or creating an invisible sprite that is pinned to the player and extends down from him. Then if the zombie is overlapping the sprite, trigger the jump.
Develop games in your browser. Powerful, performant & highly capable.
System -> Compare two Values
In the first box you type something like:
smaller or equal to
for example 10 Pixels
Distance as well as "Between two values" works for triggering EVERY zombie to jump, but not the ones within the range. I included the "For Each" condition, but it didn't seem to do anything. Every time they enter the range, every zombie starts jumping.
Make sure the 'for each' condition is first - before the distance check.