Reply To: Setting up AI with FSM top-level and BT's sub level + related questions

NodeCanvas Forums Support Setting up AI with FSM top-level and BT's sub level + related questions Reply To: Setting up AI with FSM top-level and BT's sub level + related questions

#10541
Gavalakis
Keymaster

Hey,

Glad to see you are setting this up nicely 🙂

Putting the “warning” action within a new state in itself, is certainly going to work, but I would personlay not opt to do it, since this “warning” is not really a state of the spider’s logic. I see it more like part of the Attack state, considering that this “warning” is tied to the logic of the spider getting ready to attack. Thus, I would make this warning action part of the Attack BT state.

To make something happen only once within the BT, you can use the “Filter” decorator node just above your action node and set it to “Limit Number of Times” to 1 and probably put it as first child under a Sequencer of the BT. Thus, every time the Attack BT state is entered, the action will be filtered and fired only once, until the BT State is re-entered again.

Let me know if that’s what you are after and thanks for sharing 🙂

Cheers!

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