playMaker

Author Topic: SetEventData + Enum?  (Read 1076 times)

Thore

  • Sr. Member
  • ****
  • Posts: 480
SetEventData + Enum?
« on: September 19, 2018, 12:47:28 PM »
Hello,

I'd like to use SetEventData, which has all sorts of variable types in it, except for the enum. The critical part of the action is in the method, where all available types are listed.

Code: [Select]
               Fsm.EventData.BoolData = setBoolData.Value;
Fsm.EventData.IntData = setIntData.Value;
Fsm.EventData.FloatData = setFloatData.Value;
Fsm.EventData.Vector2Data = setVector2Data.Value;
Fsm.EventData.Vector3Data = setVector3Data.Value;
Fsm.EventData.StringData = setStringData.Value;
Fsm.EventData.GameObjectData = setGameObjectData.Value;
Fsm.EventData.RectData = setRectData.Value;
Fsm.EventData.QuaternionData = setQuaternionData.Value;
Fsm.EventData.ColorData = setColorData.Value;
Fsm.EventData.MaterialData = setMaterialData.Value;
Fsm.EventData.TextureData = setTextureData.Value;
Fsm.EventData.ObjectData = setObjectData.Value;

Fsm.EventData.EnumData is unknown, and I don't know how to declare enums in the fsm script. I'm aware that I can convert enums to something else, and then pass this on, but I'd like to keep things tidy and neat, if possible.

Can anyone help me with a bit of code that adds Fsm.EventData.EnumData to the Fsm script?








jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: SetEventData + Enum?
« Reply #1 on: September 21, 2018, 02:46:22 AM »
Hi,

 yes, this is a miss unfortunatly.

 you can use the custom actions SetEventProperties and GetEventProperties if you want more control, and actually the ability to have multiple data of the same type and proper keys for each values.

these actions are available if you have the PlayMaker utils ( available on the ecosystem).

 Bye,

 Jean

Thore

  • Sr. Member
  • ****
  • Posts: 480
Re: SetEventData + Enum?
« Reply #2 on: September 21, 2018, 05:02:39 AM »
thanks, I’ll check this out.