I have a basic AI which patrols between waypoints and, upon seeing the player, should stop patrolling to go approach/attack him.
Currently, the AI finishes his route through the entire patrol before he tries to approach the player. However, he is properly sensing the player so it’s not an issue with that.
Can anyone help me figure out how to interrupt his patrol function upon seeing the player?
Behavior tree: http://puu.sh/nhyxf/c84c9b2884.png
AI controller: http://puu.sh/nhyMd/9f225bf7da.png http://puu.sh/nhyNQ/a6dfdfee6e.png http://puu.sh/nhyHU/67912eb15e.png