Playmaker Forum
PlayMaker News => General Discussion => Topic started by: FXCarl on September 17, 2014, 02:07:04 PM
-
if it possible, i can build a step by step game flow by text lines without drag and drop lots of icons 8)
i tried these codes, but it cann't work :(
void Start () {
FsmTemplate fsmt = ScriptableObject.CreateInstance<FsmTemplate>();
Fsm fsm = new Fsm();
// Gen FSM
FsmState IdleState = new FsmState(fsm);
IdleState.Name = "IdleState";
fsm.StartState = "IdleState";
//
fsmt.fsm = fsm;
PlayMakerFSM fsmObj = gameObject.AddComponent<PlayMakerFSM>();
fsmObj.SetFsmTemplate(fsmt);
}
-
Hi,
never tried it, so you'll have to fiddle with it big time, you may find that not everything you need will be exposed in the PlayMaker api... so be careful with this.
Bye,
Jean