Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: yezzer on July 08, 2012, 09:13:20 AM

Title: Enable FSM + Send Event + Debug problem
Post by: yezzer on July 08, 2012, 09:13:20 AM
Hi,

I may be misunderstanding how PlayMaker works.

When entering a certain state, I want to enable a FSM, and send it an event. Simple, right? Well, the FSM is enabled, but the event is never received. Also, a debug log error is never triggered either.

Anyone know why this is?

(http://dl.dropbox.com/u/257507/unity/screenshots/playmaker/playmaker_fail.png)
This does not call the debug action

(http://dl.dropbox.com/u/257507/unity/screenshots/playmaker/playmaker_works.png)
This does call the debug action


Thanks!
Title: Re: Enable FSM + Send Event + Debug problem
Post by: Alex Chouls on July 08, 2012, 09:32:39 AM
Is the state still active after the Send Event? Any state changes triggered by an event are immediate. Actions are executed in order, from top to bottom, so if an action changes the active state, actions below it are not executed...
Title: Re: Enable FSM + Send Event + Debug problem
Post by: yezzer on July 08, 2012, 09:46:37 AM
Nothing else affects the state of this FSM in this situation.


The debug again is not called (this screenshot taken in playback) - it's as if subsequent actions aren't processed after Enable FSM is called. As you can see Debug Log is highlighted green, but no Debug error is shown, like it would be if the first action was disabled.
(http://dl.dropbox.com/u/257507/unity/screenshots/playmaker/playmaker_fail2.png)
Title: Re: Enable FSM + Send Event + Debug problem
Post by: yezzer on July 08, 2012, 09:58:38 AM
Further to this..

If I move the Debug Log to the top, it *does* work.
Unity pauses when the error is shown, if I then unpause, the Combat FSM goes to the state specified in Send Event:
(http://dl.dropbox.com/u/257507/unity/screenshots/playmaker/send_event_working.png)

BUT - I have the Debug Log *disabled* and at the top, it doesn't work:

(http://dl.dropbox.com/u/257507/unity/screenshots/playmaker/send_event_not_working.png)
Title: Re: Enable FSM + Send Event + Debug problem
Post by: Alex Chouls on July 08, 2012, 10:29:00 AM
Strange... I'll investigate. It could be a bug...
Title: Re: Enable FSM + Send Event + Debug problem
Post by: yezzer on July 08, 2012, 01:52:44 PM
Thanks Alex. It's most likely I'm doing something wrong though  :)