Wandering - but not forever

..Tom..

New member
I'm trying to write a simple behavior tree for wandering animals - chickens and pigs on a farm, deer in forest, etc.

I want to use the "wander" task from the movement pack, but it never returns.

I'd like my animals to wander around a bit, then eat whatever is there (just play an eat animation, it's background, not simulation) or just wait there, or sit or lie down for a bit, etc. All those other things work, just wander - never returns.

How do I update my tree so that wander terminates when it reaches its destination? Or is interrupted after a random time?
 

..Tom..

New member
That would make sense, but doesn't work. When the Parallel Complete ends, the animal keeps wandering about. I suspect the navmesh agent isn't updated when it breaks out of the Wander.

Update: Yes, that's it. Put a Stop task after the Parallel Complete and it seems to work.
 
Top