Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: enigma on January 03, 2019, 05:02:32 AM
-
I'm trying to force an FSM state, with the SetState method when the FSM is disabled (the parent game object is disabled).
When the FSM is enabled, inspecting the FSM I can see that it's in the correct state but it is stuck.
Any advice about this issue? It's not possible to force an FSM state when they FSM is disabled?
-
Hi,
yes, only active fsm can be controlled as when you force a state you need to operate actions, and if that was done when disabled, how should action be executed and at one point, and what should happen to the current active state actions if they have not finished.
when I need to do that, I usually make it so that the fsm resets when enabled, and in the start state I check a variable that tells me where to go.
Bye,
Jean
-
I know this probably isn't what you're looking for because it lacks the option to choose what state to move to when the FSM is disabled.
However when you add a global transition "DISABLE" to a state, the FSM will automatically move there when disabled.
So if you could fit your logic into that one state ;)