Reply To: How can I store the current state of an FSM?

Forums 💬 NodeCanvas ⚙️ Support How can I store the current state of an FSM? Reply To: How can I store the current state of an FSM?

#23079
redikann
Participant

    Off the top of my head, I would suggest a Blackboard asset or global scene blackboard. I would create a

    public Enum TrapState      // your custom code needed

    {armed, disarmed, triggered} //suggestions

    Make sure to expose that in the preferred types editor

    Create a dictionary in one of the blackboard suggestions (dictionary (string, trapstate))

    Make the string a unique identifier for each trap and store the current Enum state

    Then look it up whenever logic needs to be refreshed.

    P.S. this doesn’t save between play sessions but would definitely work on any play thru