About OnDisable of TimeOut.cs

NodeCanvas Forums Support About OnDisable of TimeOut.cs

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #13600
    kappy
    Participant

    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.

    Thank you.

    #13607
    Gavalakis
    Keymaster

    Hello,

    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!

    Join us on Discord: https://discord.gg/97q2Rjh

    #13609
    kappy
    Participant

    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?

    Thank you.

    Attachments:
    You must be logged in to view attached files.
    #13630
    Gavalakis
    Keymaster

    Hello,

    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.

    Please let me know.
    Thanks.

    Join us on Discord: https://discord.gg/97q2Rjh

    #13647
    kappy
    Participant

    Thank you for your reply.

    Currently, the function to wait for X seconds worked without waiting X seconds.
    What is not enough to make it wait for X seconds?

    Thank you very much.

    #13648
    Gavalakis
    Keymaster

    Can you please post a screenshot of your graph?
    Thanks!

    Join us on Discord: https://discord.gg/97q2Rjh

    #13652
    kappy
    Participant

    Thank you for your reply.

    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.

    Attachments:
    You must be logged in to view attached files.
    #13666
    Gavalakis
    Keymaster

    Hello again,

    Here is an example of how to Wait for 1 second and then do something (like for example, destroy owner gameobject).
    WaitAndDestroySelf

    As such, yoy dont need to use the Timeout Decorator in the rightmost branch.
    Let me know if that works for you.
    Thanks.

    Join us on Discord: https://discord.gg/97q2Rjh

    Attachments:
    You must be logged in to view attached files.
    #13671
    kappy
    Participant

    Thank you for your reply.

    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?

    Thank you.

    Attachments:
    You must be logged in to view attached files.
    #13673
    Gavalakis
    Keymaster

    Hello again,

    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:
    ParallelComposite

    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.

    Let me know if that works for you.
    Thanks.

    Join us on Discord: https://discord.gg/97q2Rjh

    Attachments:
    You must be logged in to view attached files.
    #13676
    kappy
    Participant

    Thank you for your reply.

    I was able to realize my expected movements.
    Thank you for answering difficult questions as well.

    Thank you very much.

    #13684
    Gavalakis
    Keymaster

    You are very welcome and thanks a lot for the follow up! 🙂

    Join us on Discord: https://discord.gg/97q2Rjh

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.