playMaker

Author Topic: Quick question on how to receive info from a Gameobject  (Read 1948 times)

Splankton

  • Sr. Member
  • ****
  • Posts: 268
Quick question on how to receive info from a Gameobject
« on: October 09, 2014, 01:43:52 PM »
Hi,
I have 3 FSM's
I need to need to know from another FSM, which of the 3 has activated or fired.
Do I use something like SetEventData in all 3 FSM's, then use GetEvent info on the the other to know which one fired?  Or is there another way?

600

  • Beta Group
  • Hero Member
  • *
  • Posts: 713
    • Flashing Lights
Re: Quick question on how to receive info from a Gameobject
« Reply #1 on: October 09, 2014, 02:20:07 PM »
Hi,

have you checked GetFsm*variable* and GetState actions?
Maybe thats what you after?

junglist

  • Playmaker Newbie
  • *
  • Posts: 21
Re: Quick question on how to receive info from a Gameobject
« Reply #2 on: October 09, 2014, 02:20:58 PM »
I would use "get fsm bool"

Within each fsm, make a bool variable, name it something like "activated"
When each fsm starts, set its own bool to true. When it finishes, set it to false.
From your other fsm's you would then use the get fsm bool action.

600

  • Beta Group
  • Hero Member
  • *
  • Posts: 713
    • Flashing Lights
Re: Quick question on how to receive info from a Gameobject
« Reply #3 on: October 09, 2014, 02:26:48 PM »
Yes that could be the way to do it.

I have some Fsm's which takes variables from each other, before GetFsm*** they check FsmState "Done" or other, then its safe to get variables meaning they are loaded.

Splankton

  • Sr. Member
  • ****
  • Posts: 268
Re: Quick question on how to receive info from a Gameobject
« Reply #4 on: October 11, 2014, 01:38:14 PM »
Thanks both for your answers!