Reply To: BT and sub FSMs question

NodeCanvas Forums General Discussion BT and sub FSMs question Reply To: BT and sub FSMs question

#11356
Gavalakis
Keymaster

Hello,

Yes, using AnyState here would indeed mean adding extra intermediate states that would set the variables you need when something happened, then transition to the required SubBT, which in turn will simply make use of these variables that have now been set.

One other alternative, would be to have one (or more) concurrent nodes in the FSM set on repeat, and with custom actions that will continuously be evaluating the check your require and setting variables accordingly. As such, irrelevantly of which state (or BT State) the FSM is currently at, the variables will be set in parallel and ready to be used from all states. This if probably a better solution.

Let me know if that works for you and your thoughts.
Cheers!

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