playMaker

Author Topic: Get array of global transitions from FSM?  (Read 1957 times)

deepcanvas

  • Playmaker Newbie
  • *
  • Posts: 7
Get array of global transitions from FSM?
« on: April 25, 2013, 03:41:18 AM »
In a custom script I'm trying to get an array of all the global transitions that are handled by a certain FSM. Is there any way to access this data? Can't find anything related in the docs.

Thanks!


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Get array of global transitions from FSM?
« Reply #1 on: April 25, 2013, 02:45:07 PM »
Hi,

Interested to know as well :) what would be your use case tho?

bye,

 Jean

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Get array of global transitions from FSM?
« Reply #2 on: April 25, 2013, 03:11:33 PM »
PlayMakerFSM.Fsm.GlobalTransitions will return an array of FsmTransitions.

You can get the event from a transition using FsmTransition.FsmEvent or FsmTransition.FsmEvent.Name.

deepcanvas

  • Playmaker Newbie
  • *
  • Posts: 7
Re: Get array of global transitions from FSM?
« Reply #3 on: April 25, 2013, 07:27:34 PM »
Thanks Alex, I'll try that when I get home from work.

jeanfabre: In my scene I have an object that delegates actions to other objects. I need to know which global transitions each of these objects handle so that I can either call them directly or perform a default fallback action.