Dynamic sequencer/selector

NodeCanvas Forums General Discussion Dynamic sequencer/selector

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #9363
    tomas.trescak
    Participant

    Hi

    I still have not fully grasped the use and potential of “Dynamic” sequencers and selectors and from the explication in the canvas I don’t think I am fully aware of what it is doing. Could you please give me some example? Thanks!

    Tomas

    #9365
    tomas.trescak
    Participant

    Basically what I’m trying to achieve is a behaviour where two branches are executing in parallel.
    Imagine that in the first branch I am shooting at a player and in the second branch I am rotating at various targets.

    Thanks!

    #9364
    Gavalakis
    Keymaster

    Hey Tomas!

    Sorry for late reply. Missed your post :/

    Dynamic Sequencer and Selectors are a bit irelevant to Parallels 🙂
    Regarding you parallel case, you would simply use a Parallel node as you’d expect and have two branches as childs of that parallel. The Parallel does not repeat the child when they are finished (returned Success or Failure) though. If you want them to repeat you could use the Repeater Decorator above the branch child.

    Regarding Dyanmic Sequencer and Selector, imagine the following tree:

    Sequencer (NON Dynamic)
    – Condition (if $bool == true)
    – Action (Wait 40 seconds)

    So the tree runs and as soon as the $bool becomes true, the action executes. if prior to 40 seconds the bool becomes false, meaning the condition is no longer true, it would not matter until the next tree cycle and the action will continue executing until it is finished after 40 seconds. Then at the next traversal, the condition will final revaluate to false and the action will not take place.

    On the other hand, if that Sequencer was set ‘Dynamic’, as soon as the $bool becomes false, regardless of whether or not the action is running, it will be stopped and the Sequencer will immediately return Failure as well.

    In essense, a Dyanamic Sequencer or Selector, revaluate higher priority children status.

    Let me know if this was an ok explanation 🙂

    Thanks!

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

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