Hi! Copy pasting my post on the Unity forums below:
Hello, new user of Behavior Designer here. Seems like a great tool. I'm working on porting my existing AI behavior into tree form.
I am curious about the Wait task, I can't get it to work. It doesn't seem to ever return success. Is it because I set my tree to repeat forever, or is it because of something else?
I basically have a selector with two child tasks, one conditional checking if a target is within distance, and a wait task set to 4 seconds. So if the distance check fails, the selector should still return true after 4 seconds, if I'm not mistaken. I've gone through the source code for the Wait task, and I see that OnStart() and OnUpdate() is called every frame, but OnPause(), where the elapsed time is advanced, never gets called. I'd love to know what I'm doing wrong!
Thanks!
Edit: I forgot to attach a screenshot of my current tree. This is my first tree, and while what I have is working (left branch is WIP), I'm really wondering if I'm doing anything "correctly" at all. Maybe there's a better way of doing it?
Hello, new user of Behavior Designer here. Seems like a great tool. I'm working on porting my existing AI behavior into tree form.
I am curious about the Wait task, I can't get it to work. It doesn't seem to ever return success. Is it because I set my tree to repeat forever, or is it because of something else?
I basically have a selector with two child tasks, one conditional checking if a target is within distance, and a wait task set to 4 seconds. So if the distance check fails, the selector should still return true after 4 seconds, if I'm not mistaken. I've gone through the source code for the Wait task, and I see that OnStart() and OnUpdate() is called every frame, but OnPause(), where the elapsed time is advanced, never gets called. I'd love to know what I'm doing wrong!
Thanks!
Edit: I forgot to attach a screenshot of my current tree. This is my first tree, and while what I have is working (left branch is WIP), I'm really wondering if I'm doing anything "correctly" at all. Maybe there's a better way of doing it?
Attachments
Last edited: