playMaker

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

Splankton

  • Sr. Member
  • ****
  • Posts: 258
    • View Profile
Quick question on how to receive info from a Gameobject
« on: October 09, 2014, 10:43:52 AM »
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: 591
    • View Profile
    • Car and Traffic Playmaker assets
Re: Quick question on how to receive info from a Gameobject
« Reply #1 on: October 09, 2014, 11:20:07 AM »
Hi,

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

junglist

  • Playmaker Newbie
  • *
  • Posts: 21
    • View Profile
Re: Quick question on how to receive info from a Gameobject
« Reply #2 on: October 09, 2014, 11:20:58 AM »
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: 591
    • View Profile
    • Car and Traffic Playmaker assets
Re: Quick question on how to receive info from a Gameobject
« Reply #3 on: October 09, 2014, 11:26:48 AM »
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: 258
    • View Profile
Re: Quick question on how to receive info from a Gameobject
« Reply #4 on: October 11, 2014, 10:38:14 AM »
Thanks both for your answers!