Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: ciabaros on April 10, 2013, 01:41:33 PM

Title: StoreID Parameter in RunFSM Action (Sub FSMs)
Post by: ciabaros on April 10, 2013, 01:41:33 PM
Playing around with SubFSM (using RunFSM and FinishFSM). Amazing feature, but what in the world is storeID for?

I looked at the RunFSM action code and I can see that it writes the "fsmTemplateControl.ID", but what can be done with that ID?

Just trying to figure out if I'm missing a part of the functionality intended here...
Title: Re: StoreID Parameter in RunFSM Action (Sub FSMs)
Post by: jeanfabre on April 10, 2013, 10:53:09 PM
Hi,

 not sure myself actually :) in the code, it's clearly a reference to the template you have selected to run that fsm. So my guess is that when things get complex, you can know programmatically, what template is playing on other actions with that state or outside this fsm.

I don't think it plays a role per say in the functionnalitiy itself.

bye,

 Jean
Title: Re: StoreID Parameter in RunFSM Action (Sub FSMs)
Post by: Alex Chouls on April 10, 2013, 11:16:35 PM
No actions use the ID yet, but in the future it will be used by actions to uniquely reference a sub FSM. E.g., a Get Sub FSM Variables.
Title: Re: StoreID Parameter in RunFSM Action (Sub FSMs)
Post by: ciabaros on April 11, 2013, 01:01:17 PM
Thanks.

Suggestion: It would be cool, if you could just "save" the FSM object reference itself; this could be done in 2 ways:

1) by using an FsmObject type variable (with "PlayMakerFSM" subtype -- kinda clunky, but currently supported).

2) Adding a variable type, explicitly used for FSM reference storage. This would be extremely useful, because then you could have just 1 Action to retrieve/find an FSM, and every action which works WITH/ON FSMs could simply take an FSM variable.. much more elegant and inline with your current approach for many other actions.

EDIT: This steps into another, more general Feature Request, which I'll drop in full detail in the appropriate section under "Passing FSMs as Variables (new 'Fsm' varaible type)"