playMaker

Author Topic: Is there a way for an external script to be notified when state changes?  (Read 2530 times)

valyard

  • Playmaker Newbie
  • *
  • Posts: 8
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.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Is there a way for an external script to be notified when state changes?
« Reply #1 on: November 19, 2013, 12:57:03 AM »
Hi,

 I am not aware of any such callbacks.

Bye,

 Jean

valyard

  • Playmaker Newbie
  • *
  • Posts: 8
Re: Is there a way for an external script to be notified when state changes?
« Reply #2 on: November 19, 2013, 03:52:58 AM »
Weird. This is like the first feature most of programmers would want.

Yanifska

  • Full Member
  • ***
  • Posts: 163
    • My Portfolio
Re: Is there a way for an external script to be notified when state changes?
« Reply #3 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
Visit my portfolio: http://www.yanivcahoua.com/

valyard

  • Playmaker Newbie
  • *
  • Posts: 8
Re: Is there a way for an external script to be notified when state changes?
« Reply #4 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.

Yanifska

  • Full Member
  • ***
  • Posts: 163
    • My Portfolio
Re: Is there a way for an external script to be notified when state changes?
« Reply #5 on: November 19, 2013, 05:16:34 AM »
Indeed...
Just out of curiosity, why do you need to check every state ?
Visit my portfolio: http://www.yanivcahoua.com/

valyard

  • Playmaker Newbie
  • *
  • Posts: 8
Re: Is there a way for an external script to be notified when state changes?
« Reply #6 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.