Patrol and chasing AI

Hello guys
first of all i want to apologize for my bad english
I was trying to make my first game and iam stuck at the Ai of the enemy
the most tutorials on Youtube are about how the Ai can Patrol Randmly, following one Path or is chasing the Player.
But thats what i need is more simply but more tricky then the turorials.
I have 2 collision box in the Map and have 1 Path in each collison Box
so i want the Ai to follow the path in the collision Box after the player enter the box
and if the AI see the player he will chase him.
any ideas or tutorial how i can make it
i have a bluprint how the AI can Chase the player and how he follow a path but hats are my limits

in conclusion: i have 2 collision box and 2 paths (8 Points on each path) if the player enter a collision Box the Ai shouldfollow the correct Path and try to find the player

what does your current setup look like? are you using behavior trees or just scripting? and which kind of perception (ai perception or pawn sensing)? also how hostile do you want the ai? should they forget the player if they leave the collision or should they follow him forever?

at the most simple you need to first have a array of locations and script a loop for the patrolling. so event patrol, get next destination from array, move to destination, on success or fail get next index in array and set that as next destination, call event patrol to loop again. then you also add in a little check to make sure you stay in the bounds of the array. thats the patrol done.

then you need to have another event which is triggered when the player is detected. on detect target, move to actor location. simple.

it gets a bit more complex when you want the ai to stop chasing the player and if your using behavior trees.