Even if Dynamic is set to true, OnDisable is not called.
I am working now in a way I modified it myself
The correction content is in ConditionalEvaluator.cs
I added
public override void OnGraphStoped ()
{
condition.Disable ();
}
If you do not mind, please let me know how to deal with it.
The Timeout condition, does indeed not work correctly in the context of Behaviour Trees right now, but rather only in the context of FSMs, since in BTs, condition disable method is never called. In the context of Behaviour Trees however, I would like to suggest that you can use the “Timeout” Decorator node instead, which is a better fit for doing the same thing in a Behaviour Tree.
Please let me know if using the Timeout Decorator node works for you as a solution.
Thanks!
Thank you for your reply.
I tried using the “timeout” decorator node, but I could not get it to work as expected.
I made this kind of setting myself, but what was wrong?
Can you please clarify what is not working as expected?
The Timeout decorator, will basically interrupt it’s child node after the timeout period has come to pass (eg after X seconds).
Do you instead want to Wait for x seconds before the child node is executed though?
If so, you can simply use a “Wait” action task. You can also add a “Wait” action task in the same node that your “Destroy Self Task” is attached if you want. That will create a “list of action tasks”, all being part of that single Action Node.
Just make sure that the Wait action is at the top of the Actions List, and that the setting is set to “Actions Run In Sequence”. Thus Wait will run first and as soon as that is done, Destroy Self will run.
I am sorry, but I can not show everything, so I partially hidden it.
I think that the processing that affects other hidden parts has not been done yet.
If you do not mind, please reply.
Thank you very much.
I tried “Wait”.
The waiting process performed as expected, but the part of “Move” in the figure below seems not to be called repeatedly, and it has become a state where it does not move well.
How should we deal with it?
This is because the Sequencer, executes the actions in order from left to right.
Whenever you want to execute more than one actions simultanously (parallel), you need to use the Parallel Composite, which specifically exists for that reason 🙂
Here is an example of usage, based on your example:
All child nodes of a Parallel Composite node, will execute simultanously. As such, the left action node (“Log Hello World”), will be executed WHILE, the right side child (Sequencer Branch) is executed as well.