playMaker

Author Topic: StoreID Parameter in RunFSM Action (Sub FSMs)  (Read 4675 times)

ciabaros

  • Playmaker Newbie
  • *
  • Posts: 13
    • View Profile
StoreID Parameter in RunFSM Action (Sub FSMs)
« 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...

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14328
  • Official Playmaker Support
    • View Profile
Re: StoreID Parameter in RunFSM Action (Sub FSMs)
« Reply #1 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

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3627
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: StoreID Parameter in RunFSM Action (Sub FSMs)
« Reply #2 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.

ciabaros

  • Playmaker Newbie
  • *
  • Posts: 13
    • View Profile
Re: StoreID Parameter in RunFSM Action (Sub FSMs)
« Reply #3 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)"
« Last Edit: April 12, 2013, 09:51:23 PM by ciabaros »