playMaker

Author Topic: Help with Events from script and SendEvent + GetFsmEvent  (Read 1956 times)

Andy22

  • Junior Playmaker
  • **
  • Posts: 99
Help with Events from script and SendEvent + GetFsmEvent
« on: December 16, 2013, 07:06:56 AM »
Hi,

if i understand this correctly if u send a event from script via string, playmaker will use the "GetFsmEvent" call and if the event is "unknown" it will create a new event?

I wonder whats the logic behind this? If the event is "unknown" to the FSM, could u theoretically have written transitions/logic so that this behavior makes sense?

So do i miss something or whats the reason behind this?
I'm just asking since the PM event system looks like a registering event system to me, means only events that are pre-setup correctly should be send and otherwise a warning should be displayed?

bye Andy

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Help with Events from script and SendEvent + GetFsmEvent
« Reply #1 on: December 16, 2013, 07:26:02 AM »
Hi,

 what kind of transition/logic would like to see there?

 I guess a feature to fire a warning or an error on a event string not found could make sense. It may be for performance reasons.

bye,

 Jean

Andy22

  • Junior Playmaker
  • **
  • Posts: 99
Re: Help with Events from script and SendEvent + GetFsmEvent
« Reply #2 on: December 16, 2013, 07:58:44 AM »
Ah oki,

so there is no special logic behind this i'm missing. I guess the setup this way, because there is no "clean" register/unregister mechanic in place. So PM can't really implement something like "SendMessageOptions".

Was just curious, i actually try to "fix" this for us, by only allowing the use of known events from a enum, instead of a user defined string. The reason is, that if u can send "lala Event" to a FSM via script code/action and there is actually no "lala Event" locally/globally at all, it's always a setup error, we want to prevent.

Thx for the clarification.


bye Andy