I am trying to make my zombie AI attack my player character as soon as it is in range. This ‘range’ is determined by a custom box collider on my player character. I am using a behaviour tree to make the AI switch between roaming, chasing and attacking the player. However every time the AI gets close to the player the behaviour tree starts to flicker, the AI does not play the attack animation and often even just walks away from me. I cannot find a decent solution using search engines or the forum so here I am. I am still new to developing so there is a strong possibility it is a small mistake or something that is left out.
Here is an overview of my settings:
Behaviour Tree:
The service where it checks if the zombie is in the collider:
The Zombie character blueprint event graph:
The costum collider that functions as the attack range for the zombie. This is checked to set the blackbord Boolean key:
The chase task. I am posting this to see if it can explain why my zombie runs away (irregular event) after reaching me. This was already happening before the new attack behaviour:
So in short: I am trying to make the AI play his attack animation when he stands in the collider and prevent my AI to walk away from me after reaching the player’s location.