Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: jeanfabre on April 08, 2011, 07:58:55 AM
-
Hi,
Can't find my way around this one.
Following the SetEventData.cs I want to send an event from a c# script and populate events data very much like on that action.
problem, I don't have access to myFsmComp.fsm.EventData it only seems to be available from an Action script.
How can I achieve this. Currently, I have to get the variable directly and set it. This is very wrong from a practice point of view cause I have to hard code variables names and it breaks encapsulation. Hopefully, this is available, and I missed it.
Bye,
Jean
-
EvenData is a static variable - just set it with Fsm.EventData... before sending an event.
-
Hi Jean, did you have a chance to try this? Would like to confirm that setting event data works as expected from external scripts...
-
Hi Alex,
Yes, Finally got the time to run that simple test and it works very well.
So yes, using Fsm.EventData.xxxData within your script get's properly caught by the GetEventInfo action : https://hutonggames.fogbugz.com/default.asp?W530
Bye,
Jean