Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: mindlube on July 30, 2012, 06:17:51 PM
-
I need to resume/load an FSM which I have loaded from disk or got from network play.
It could be as simple as
FSM.SetState( "name" ), which doesn't exist in the api that I can find.
and
FSM.ChangeState() takes an Event parameter, not a state name.
FSM.ActiveStateName is read-only property.
The only alternative I can see is to make a global transition ( like "resume {state name}" ) to be able to re-enter arbitrary points in the state machine? Thats a lot of tedious editing of new nodes in my graphs :P This seems time consuming, so please give suggestions or what am I missing? thanks! ;D
-
Hi,
Yeah, currently you will need to fire a Global Event to enter a state, even with the api. Maybe future version of playmaker will allow and even implement some features to have more control over resuming.
bye,
Jean
-
GetComponent<PlayMakerFSM>().Fsm.GetState("State1").Name = "NewStatename";
//the current name of the state, for example, is State1
-
Hi congson1907.
If you need the current state name you need
Fsm.ActiveStateName