playMaker

Author Topic: Multiple Simultaneous Event  (Read 745 times)

kmartinf

  • Playmaker Newbie
  • *
  • Posts: 3
    • View Profile
Multiple Simultaneous Event
« on: December 28, 2017, 09:21:34 PM »
Hi,

I usually try to look around before asking, but it been a couple hours and I still cant resolve this workflow.

I would like to active multiple simultaneous events on a key press.
For example, (look at image/attachment). 

When I press down key "q", trigger "OptionA", which trigger state "Active A" which has 3 events, "Chair 01", "Chair 02" and "Chair 03". Each one has a State with an action inside, and I want them to run simultaneously and return back to "Organization".

so far, when i press "q" it goes to state "Active A" and remains there.

kmartinf

  • Playmaker Newbie
  • *
  • Posts: 3
    • View Profile
Re: Multiple Simultaneous Event
« Reply #1 on: December 28, 2017, 10:21:06 PM »
I try another methods, see image.

Where when i press letter "q", it broadcast "optionA" which it triggers optionA in each chair, and return to Organization.

however, it only triggers Chair03 optionA. Instead of all Chairs OptionA.

Thank you for the help in advance.

tcmeric

  • Beta Group
  • Hero Member
  • *
  • Posts: 691
    • View Profile
Re: Multiple Simultaneous Event
« Reply #2 on: December 28, 2017, 11:04:23 PM »
A state machine can only be in one state at once. If you want multiple states to be fired at the same time, you need to have more than one playmaker FSM. One FSM can send events to multiple other FSM.

kmartinf

  • Playmaker Newbie
  • *
  • Posts: 3
    • View Profile
Re: Multiple Simultaneous Event
« Reply #3 on: December 28, 2017, 11:39:28 PM »
So, from the second image, I have to break down each Chair as it own FSM.

I wanted to keep them in the same FSM because it is more convenient to work in one window (FSM). Instead of toggling between FSM back and forward.

krmko

  • Beta Group
  • Hero Member
  • *
  • Posts: 926
    • View Profile
    • Fat Pug Studio
Re: Multiple Simultaneous Event
« Reply #4 on: December 29, 2017, 04:22:10 AM »
You can't, it's the nature of the FSM itself, it can be in only one state. As Tcmeric suggested, use multiple FSM's and one FSM as "controller" for sending events to other FSM's if you want to keep it all in one window.