Wander Question

nitrox32

Member
I'm kinda new to BD so maybe this is a basic question, but no matter what I do I can't seem to get the behavior I want. I would like the agent to patrol until it sees the the player then seek the player, after catching up to the player I want it to flee. This part is working. After fleeing I want it to wander until sees the player then patrol again. The problem is that no matter what I do I can't get the agent to stop wandering. Can anyone give my an example of how to do this?
 
The Wander task returns a status of running so it never ends. You can stop it using conditional aborts. The Deathmatch AI Kit contains a large tree but the Search for Target task is similar to wander in that it always returns running so you can use that as an example:


Notice in this tree there is a lower priority conditional abort that will abort the wander task.
 
Top