Repeater with "Can see object" gets stuck after seeing object first time.

Max Nielsen

New member
I have the following tree. Basically I want my AI to wander until it sees my player, then stop and wave, then continue to wander.

It works, however it seems "Can see object" is not only triggered OnEnter, so it gets stuck there because it always returns success after first time seeing the object, since the AI stop and waves and as long as it sees the player it will keep repeating.

Is there any way to add so it is only triggered OnEnter, och maybe add some cooldown to the wave? Because if my player stands still, this will repeat forever.

help wander.jpg
 

Justin

Administrator
Staff member
If you use a both conditional abort then Can See Object will be reevaluated when Wait is active.
 
Let's consider the frame after AI has finished waving. If player is still in the view field of AI what should happen? The behavior is setup so that AI should wave when it sees the player, well then it's going to wave again because that's what it's told to do. Now, how to fix this loop. I think what's needed is to somehow prevent the AI to see the player again after waving. Maybe after the wave animation is done turn the AI away from the player?
 
Top