Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: valyard on November 18, 2013, 07:37:10 AM

Title: Is there a way for an external script to be notified when state changes?
Post by: valyard on November 18, 2013, 07:37:10 AM
Hi.

Is there an event (in c# terms) which is dispatched when state changes?
Or some other way to find out if state changed?
Other than checking current state manually every frame. Which may not detect instant state transitions.
Title: Re: Is there a way for an external script to be notified when state changes?
Post by: jeanfabre on November 19, 2013, 12:57:03 AM
Hi,

 I am not aware of any such callbacks.

Bye,

 Jean
Title: Re: Is there a way for an external script to be notified when state changes?
Post by: valyard on November 19, 2013, 03:52:58 AM
Weird. This is like the first feature most of programmers would want.
Title: Re: Is there a way for an external script to be notified when state changes?
Post by: Yanifska on November 19, 2013, 04:53:41 AM
if you want to check a specific state maybe you can have it send a message or call a method etc.....
https://hutonggames.fogbugz.com/default.asp?W44
Title: Re: Is there a way for an external script to be notified when state changes?
Post by: valyard on November 19, 2013, 04:54:49 AM
if you want to check a specific state maybe you can have it send a message or call a method etc.....
https://hutonggames.fogbugz.com/default.asp?W44

That's what I'm doing at the moment.
But in this case EVERY state has to have this method call action.
Which is excessive.
Title: Re: Is there a way for an external script to be notified when state changes?
Post by: Yanifska on November 19, 2013, 05:16:34 AM
Indeed...
Just out of curiosity, why do you need to check every state ?
Title: Re: Is there a way for an external script to be notified when state changes?
Post by: valyard on November 19, 2013, 05:17:54 AM
Indeed...
Just out of curiosity, why do you need to check every state ?

I'm syncing states between Unity host and Scaleform interface made with Flash.
Basically, there's a slave copy of the FSM on Flash side.