Is there a way to tell a FSM to immediately change to a state?
There's a method ChangeState() which inexplicably takes an event. Also, ActiveState is private, though I agree setting that would be a bad idea as it probably needs to do some state initialization.
I want to control my FSM externally. As a very basic example, if the player interfaces with a Chair object the Chair will tell the player what action to do based on the state of the Chair. [Face away, Play sit animation, Make sitting sound, etc]
Part of the problem is that with modern small games you need to be able to recreate your state on reloading. For instance, the Chair will remember a character is already sitting and needs to force it to resume from that state.
I could populate every state with a list of transition events, but that would be a terrible idea. Although it does make me wonder if I can set up global transitions a state will fall back to at any time. There doesn't seem to be functionality for that, though.
My current workaround is to make a new FSM for every action. It seems to be the only good way to create an externally influenced FSM system. This isn't necessarily a bad thing, but it does seem like there might be a better way.