playMaker

Author Topic: Sub States in Playmaker  (Read 3301 times)

kkaul

  • Playmaker Newbie
  • *
  • Posts: 2
Sub States in Playmaker
« on: April 10, 2014, 05:46:48 AM »
I have read in the forum that Playmaker will be implementing the Sub state Functionality. Is there any update on it?

Currently without sub states, i have a lot of states having redundant transitioning events that i want to minimize.
If sub states are implemented, it would clean up the FSM.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Sub States in Playmaker
« Reply #1 on: July 21, 2017, 03:04:16 AM »
Hi,

 Right now there is no short term plans on this, so the best way is to rely on multiple Fsms, sharing common variables using a Meta fsm ( an fsm that holds the variables and other fsm use GetFsmxxx to get them and work with them) or Templates, that you run in many different states.

You can also create a Event convention where you have this kind of protocole:

ON SOMETHING WILL START
ON SOMETHING DID START
ON SOMETHING WILL END
ON SOMETHING DID END

this is a typical protocole used in xcode for native iPhone apps for example, and it's very powerful, because you then fire these event globally or within a given hierarchy branch, and so an Fsm can fire WILL START, and several other fsm will catch it, do the work, and one of them will fire DID START, and so on.

Bye,

 Jean