Reply To: What exactly is a dynamic node?

Forums 💬 NodeCanvas 🗨️ General Discussion What exactly is a dynamic node? Reply To: What exactly is a dynamic node?

#14986
Gavalakis
Keymaster

    Glad to hear.

    There is some extra cost with dynamic nodes of course but considering the other ways of doing this around, not really.

    A Dynamic node is dynamic (revaluates) in regards to its child nodes only. Take this example:

    Dynamic Sequencer
    –Condition (x == true)
    –Normal Sequencer
    —-Condition (y == true)
    —-Action1 (Wait 1 day)
    –Action2 (Wait 1 day)

    So, in this setup regardless of which Action of the 2 is running, if x becomes false, action will be interrupted and the root sequencer will return failure. That is because x is checked under the Dynamic Sequencer.
    If though y becomes false nothing will happen immediately, since y is not revaluated “dynamicaly” because that condition is NOT under a Dynamic node.

    You could though mark the 2nd sequencer Dynamic as well, making this whole example tree work dynamic recursively.

    Actions will NOT re-run if they are under a dynamic node due to the node being dynamic. So if you have:
    Dynamic Sequencer
    –Action
    –Action
    –Action

    You wont get 3 actions running and revaluating all the time. You will simply get one as normal.

    So, having a SubTree under a Dynamic Sequencer won’t really make a difference just by itself.

    It needs some experimentation to really grasp them, but believe me, Dynamic Nodes are super useful 🙂
    Let me know if you need more clarification