hello,
first off let me tell you that i am quite new to the unreal engine. what i have created so far is the following:
-
a third person character able to move around / fire a projectile
-
a zombie character
the zombie char was created following a bot tutorial on youtube. i modified it since my zombie is a melee character while the tutorial was for a shooting one. it uses an ai controller, a blackboard, a behaviour tree and several tasks and decorators.
when i place it in the world it all works as expected, the zombie can sense me through ai perception and will then move to my position, when nearby he will start punching. when i move away he will follow until i break the line of sight. then he will go back to patrolling between waypoints.
the problem now is: if i pull a second instance of this zombie into the level ( or if i spawn it via blueprint, makes no difference ) it all breaks down. if a zombie sees me it will start to move to me, then go to partrol mode, then move to me and so on. to me it looks like both zombies are using the same state variable, so because one sees me it goes to the move state, but the other one doesn’t so it switches to patrol mode.
when i open the behaviour tree in debug mode i can see that there are multiple instances of the ai controller. yet both jump wildly between states.
i hope someone can help or clarify what is going on here and how i can fix it.
thanks