I'm working with the A* Pathfinding Project on a 2D platformer, I just want a simple fleeing state behaviour. I have got the AI fleeing but not quite behaving how I want it to.
I'm using these two methods to get which way the enemy is facing:
Once the health of the enemy is <= 10 I call Flee which is this:...
Scripting error for fleeing enemy
I'm using these two methods to get which way the enemy is facing:
Code (CSharp):
- private bool IsLeft()
- {
- return transform.localScale.x == -1;
- }
- private bool IsRight()
- {
- return transform.localScale.x == 1;
- }
Scripting error for fleeing enemy