Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: deepcanvas on April 25, 2013, 03:41:18 AM

Title: Get array of global transitions from FSM?
Post by: deepcanvas 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!

Title: Re: Get array of global transitions from FSM?
Post by: jeanfabre on April 25, 2013, 02:45:07 PM
Hi,

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

bye,

 Jean
Title: Re: Get array of global transitions from FSM?
Post by: Alex Chouls 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.
Title: Re: Get array of global transitions from FSM?
Post by: deepcanvas 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.