Reply To: Reset BB variable if FSM transition is not possible

Forums 💬 NodeCanvas 🗨️ General Discussion Reset BB variable if FSM transition is not possible Reply To: Reset BB variable if FSM transition is not possible

#13773
Gavalakis
Keymaster

    Hello and welcome.

    Just so we are on the same page here, can you please clarify what you mean by setting the Vector3 to null since normal Vector3 can’t be set to null (it’s a value type)? 🙂 Do you mean that you are setting the BBParameter object itself to null?

    Other than the above and into your question, one solution, would be to use a “Super Action State” instead of a normal “Action State” for “Alert” and have your variable set to null when the state Exits, by having an action task which does this, added in the “Super Action State” “On Exit Action List”.

    If you are making custom action tasks, then the above could also be achieved in a normal “Action State” and by overriding the Action Task “OnStop” method, which is called when the action is stopped. An action can be stopped either because the EndAction method is called, or because the state in which it is attached has ended.

    Let me know if that works for you, or if you need any further help.
    Thanks.