playMaker

Author Topic: Can I get the initiating FSM from within a custom action? [SOLVED]  (Read 1379 times)

Rupe

  • Playmaker Newbie
  • *
  • Posts: 7
I'd like to know the name of the FSM that initiated my custom action. Is this possible? I see I can get the GameObject, through the Owner, but that doesn't give me what I'm after (especially if the GameObject has multiple FSMs on it).
« Last Edit: April 10, 2017, 11:09:29 AM by Rupe »

tcmeric

  • Beta Group
  • Hero Member
  • *
  • Posts: 768
Re: Can I get the initiating FSM from within a custom action?
« Reply #1 on: March 24, 2017, 01:44:20 PM »
Following  :)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Can I get the initiating FSM from within a custom action?
« Reply #2 on: April 10, 2017, 02:35:47 AM »
Hi,

 Inside an action, you need to do:
Code: [Select]
this.Fsm
then you have access to all the details of this fsm, its name, it's gameobject, all its variables, events, states, activate state etc etc.

Bye,

 Jean

Rupe

  • Playmaker Newbie
  • *
  • Posts: 7
Re: Can I get the initiating FSM from within a custom action? [SOLVED]
« Reply #3 on: April 10, 2017, 11:09:13 AM »
Thanks, I figured it'd be straightforward