First of all, I have just started using Behavior Designer and I'm astonished by all the possibilities!
I have this sequence in my tree. It works fine:
Check if there was a distraction, move the character towards it, then waits at that position for X seconds.
The problem is the sequence won't work for a second time because Check Distraction and Wait tasks are marked as completed, retaining the values when they ran for the first time.
The solution I thought was to call the OnReset() method of Check Distraction and Wait when the sequence is completed.
A created a Reset Task that references another task and calls the OnReset(). I have put it at the end of the sequence, but this doesn't seem very efficient and is very hard to maintain and modify. Especially because I was not able to add a list of Tasks to reset, just one per node.
So I wondering if there is an easier way to reset the tasks within a sequence after it is finished.
Thank you.
I have this sequence in my tree. It works fine:
Check if there was a distraction, move the character towards it, then waits at that position for X seconds.
The problem is the sequence won't work for a second time because Check Distraction and Wait tasks are marked as completed, retaining the values when they ran for the first time.
The solution I thought was to call the OnReset() method of Check Distraction and Wait when the sequence is completed.
A created a Reset Task that references another task and calls the OnReset(). I have put it at the end of the sequence, but this doesn't seem very efficient and is very hard to maintain and modify. Especially because I was not able to add a list of Tasks to reset, just one per node.
So I wondering if there is an easier way to reset the tasks within a sequence after it is finished.
Thank you.