playMaker

Author Topic: Send message to sub-FSMs?  (Read 3279 times)

louismg

  • Playmaker Newbie
  • *
  • Posts: 13
Send message to sub-FSMs?
« on: November 22, 2013, 05:45:03 PM »
Hi,

I had 2 complex FSMs on one object and all was working well.  Now I need to use those same complex FSMs on many object so I saved the FSMs as templates and on each object I now put a simple FSM that simply does 2 "run FSM" with the complex templates.

Since then, when another object is "sending event by name" (like it used to), the sub FSM is not getting the event and the state transition does not trigger.  I put a breakpoint on it to check to make sure.

Help?

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4002
  • Official Playmaker Support
    • LinkedIn
Re: Send message to sub-FSMs?
« Reply #1 on: November 22, 2013, 06:43:10 PM »
How is the event being sent?
You can set the target to SubFSMs.

But we may need another option depending on what you're trying to do... Or maybe a forward events option on the Run FSM action...

louismg

  • Playmaker Newbie
  • *
  • Posts: 13
Re: Send message to sub-FSMs?
« Reply #2 on: November 23, 2013, 06:27:02 AM »
This is how I send it.



I did get around the problem by launching the two FSMs as templates directly from the object. Still, it would be nice to know how we can do this as I will need it for sure.

louismg

  • Playmaker Newbie
  • *
  • Posts: 13
Re: Send message to sub-FSMs?
« Reply #3 on: November 27, 2013, 04:49:50 PM »
Bump!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Send message to sub-FSMs?
« Reply #4 on: November 28, 2013, 02:19:55 AM »
Hi,

 Use the action "sendEvent" and select "Sub Fsms" in the "Event Target". have you tried this?

bye,

 Jean

louismg

  • Playmaker Newbie
  • *
  • Posts: 13
Re: Send message to sub-FSMs?
« Reply #5 on: December 02, 2013, 12:36:35 PM »
Never noticed that!  Will do. Thanks!