Reply To: BT sequence of actions that starts&restarts when receiving a specific Event

Forums 💬 NodeCanvas ⚙️ Support BT sequence of actions that starts&restarts when receiving a specific Event Reply To: BT sequence of actions that starts&restarts when receiving a specific Event

#17812
timv
Participant

    I now have this:
    – Top level node is a dynamic selector
    – The first child will check for the event and set a variable $ButtonIndex when the event is received
    – The second branch checks for this value
    – In the first action of the sequence, the variable $ButtonIndex is set to the value -1.
    This will make sure that the branch is not selected again before a new event has been received.

    It’s working as intended, but I wonder if there is a more elegant way of doing it without requiring me to use a special value for $ButtonIndex (-1).