Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: louismg on November 22, 2013, 05:45:03 PM

Title: Send message to sub-FSMs?
Post by: louismg 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?
Title: Re: Send message to sub-FSMs?
Post by: Alex Chouls 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...
Title: Re: Send message to sub-FSMs?
Post by: louismg on November 23, 2013, 06:27:02 AM
This is how I send it.

(http://content.screencast.com/users/Louismg/folders/Jing/media/c6a643e0-ff5c-480e-adb8-ad22c957a7e4/00000060.png)

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.
Title: Re: Send message to sub-FSMs?
Post by: louismg on November 27, 2013, 04:49:50 PM
Bump!
Title: Re: Send message to sub-FSMs?
Post by: jeanfabre 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
Title: Re: Send message to sub-FSMs?
Post by: louismg on December 02, 2013, 12:36:35 PM
Never noticed that!  Will do. Thanks!