AI follow player

hi, i have a question.i need AI to follow me. So i made this :

But , the Ai follow me from the start and when he reach me he stop. But i need for him some kind of range view, and if he lose me he will continue to walk randomly.Can someone help me?
P.S. i try the tutorial from UE4 wiki but it doesn’t work. i dont’ know why.

Hello!
You need to add a component in the AI blueprint that’s called PawnSensing. Once you added the component compile and save. Then you should see somthing like this:

The green cone define the AI sight, the other two are for sound sensing. At first the cone will be flat because by defaut its radius is 90, but you can change it using the PeripheralVisionAngle. Also, the Sight Radius is how far AI can see.

Finally on the EventGraph, whith the PawnSensing component selected, you can call an event named OnSeePawn. From there you can make it follow the player character with AI Move To node.