Zombie [AI]


I am trying to make a zombie AI that on start goes to closest Actor that I chose, and line traces if he sees my player he will chase him until out of sight then goes back to move to Actor.
Or goes to point where he hears explosion waits for ‘x’ time then goes back to move to his actor
I know how to check if he sees player with line trace, I just do not know how to implement all of this in Behaviour Tree to make it work. Because behaviour tree is on tick at beginning so he will constantly go to actor, I am confused.


Main path tell the zombie to choose the shortest distance and to choose his actor to go to based on that, so player or base which he will then attack when arrives, check actor, he cheks with linetrace and multi spheretrace, if my player is there he will follow him instead (if his objectif was the base)

So, the fiest part works where he chooses to or go to base, but thats about it?

Also this will be replicated on many zombies as a hored, is this the way to go?

I am new to Ai and behaviour tree, I read all about them and watched many videos, could someone help me out please?