Hello,
So I hit a snag again, unfortunately!
I have a mob that I am creating that needs to patrol a specific area and when the player would come to a certain distance from this mob the mob would play the alert animation and then when the player comes closer, would taunt the player.
Finally, when the player comes close enough, he would attack the player.
Here is my setup.
1- The patrol system:
I created an empty game object called "Waypoint Manager" and created 6 boxes (with deleted collisions and meshes) and added a FSM that randomly picks one of the boxes and plays the "walk" animation on the mob and sends it to that direction. The FSM is attached to the Waypoint Manager
So far that system works perfectly fine.
2- The state system:
I created an FSM on the mob itself and have a state with the "Get Distance" action which measures the distance every frame between the mob and the player. Float compare was used then to compare the distance and then flow through 1 of the three states (alert, taunt and attack).
In each of the states, I have the "Stop Animation" action that stops the animation from playing. However, I would like the mob to stop the movement however (as it still moves). I can't find a "Stop Action" or "Over rule Action" in the list of actions that I can make it stop the actions in "Waypoint Manager" from playing until the distance of the player is far more than what is required for the different states (alert = 11.2; taunt = 6; attack = 4.2).
Is there a way to do this?
Thank you very much in advance.
EDIT: Thank you everyone you have solved it all