How to make my enemy AI stop following player?

alright, I’ve got it settle, and here’s how I did it.

First, I made the behavior tree

It is important to note that I made it abort on both when the Blackboard “CanSeePlayer” is met,

I used the perception AI and made the blue print as below.

and also set the limitation of sight. But first you have to enable it, by adding sense config and having Ai sight config. Then open sense, there will be a drop box menu as below.

102795-enabling+senses.jpg

Setting up the AI behavior tree and the black board as well as the move to player blue print as below, you would surely made your AI to not follow player after it losses sight.

I found this video from Telsa Dev, and it teaches about AI behavior, if you would like to learn more , here’s the link Unreal Engine 4 Tutorial - AI Behaviour Tree - YouTube