playMaker

Author Topic: Catch Events from FsmStateAction to cancel a transition  (Read 1817 times)

Cripple

  • Playmaker Newbie
  • *
  • Posts: 1
Catch Events from FsmStateAction to cancel a transition
« on: October 30, 2013, 06:01:30 AM »
Hi,

Is there a way to cancel a transition in a custem FsmStateAction.

There is a function to override which is called Event() and which returns a bool, I thought that we could eat the event there but it doesn't.

I am looking for a way to cancel a transition or at least wait a condition before making the transition to happen.

Regards =)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Catch Events from FsmStateAction to cancel a transition
« Reply #1 on: October 30, 2013, 08:34:27 AM »
Hi,

It's not really possible, this must be implemented in your logic. Expressing a condition change implies using a transition somehow, if you want to change the behavior of your feature.

Have another fsm checking for this transition condition and fire a event to that fsm, or change a fsm bool on that fsm, in the waiting state you can watch for this boolean value to change or implement that event as a transition to move to another state.

 bye,

 Jean