> So I'm trying to design AI for prey.. small creatures you can hunt down. They dont attack, they just run. I want to make a pathfinding event that will make them find a path that is away from the player or other creatures that hunt. If youre chasing them I want them to continue to stay one step ahead of you and be able to adjust their running direction or turn around if you cut them off for example. Any ideas?
>
Have you tried having the prey 'path find' a random X/Y value that is the opposite direction of the player in relation to them? Then it can update either every few seconds if the player is moving or once they reach their destination and they can move again.
You could also pin an invisible radius sprite to the prey so if the radius object collides with the player it will trigger the prey movement along their path and give them the illusion of smart behavior.
Not sure if any of this is what you are looking for, just throwing out some ideas .
See I the first idea is what I want to do, I've had the concept for a while but I have no idea how to implement it. I don't know how to specify a random xy within 90 degrees of the player's angle.