playMaker

Author Topic: "Set Event Data" action not working [SOLVED]  (Read 3918 times)

Jernau

  • Playmaker Newbie
  • *
  • Posts: 19
"Set Event Data" action not working [SOLVED]
« on: April 10, 2012, 03:14:51 PM »
Hi, I'm a PlayMaker noob, and I'm absolutely loving the software so far! :)

However, I'm having a problem with the "Set Event Data" action. When I use the "Set Game Object Data" field in one FSM and then send an event, and try to access the GameObject in another FSM using the "Get Event Info" action and the "Get Game Object Data" field the GameObject is always "None". With the exact same setup, but using "Set Vector3 Data" I receive the Vector3 perfectly. So I was wondering if this is a bug in PlayMaker, or am I misunderstanding how "Set Game Object Data" should work?

My current work-around is to send the GameObject's position as a Vector3, and then re-find the GameObject from its position in the receiving FSM. However, this is a really clunky solution, and I'd really like to just be able to access the GameObject that I sent with the event.

I took a quick look at SetEventData.cs, and I thought that perhaps the wrong type is being used?

Code: [Select]
public override void OnEnter()
{
    Fsm.EventData.BoolData = setBoolData.Value;
    Fsm.EventData.IntData = setIntData.Value;
    Fsm.EventData.FloatData = setFloatData.Value;
    Fsm.EventData.Vector3Data = setVector3Data.Value;
    Fsm.EventData.StringData = setStringData.Value;
    Fsm.EventData.ObjectData = 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;

    Finish();
}

I wondered if it shouldn't be "Fsm.EventData.GameObjectData = setGameObjectData.Value"?

Thanks in advance for any help with this! :)
« Last Edit: April 10, 2012, 05:03:43 PM by Jernau »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4000
  • Official Playmaker Support
    • LinkedIn
Re: "Set Event Data" action not working
« Reply #1 on: April 10, 2012, 04:43:54 PM »
That is indeed a bug in 1.3.2. It's fixed in 1.3.3, which should be out soon...

A less clunky workaround for now would be to use a global GameObject variable for that event data...

Jernau

  • Playmaker Newbie
  • *
  • Posts: 19
Re: "Set Event Data" action not working
« Reply #2 on: April 10, 2012, 04:49:49 PM »
Thanks for the fast reply! It's great to hear that the bug is fixed in 1.3.3, and I'll definitely switch to your less clunky work-around.