playMaker

Author Topic: Checking that an FSM has ended[SOLVED]  (Read 95 times)

TVISARL

  • Playmaker Newbie
  • *
  • Posts: 3
    • View Profile
Checking that an FSM has ended[SOLVED]
« on: April 10, 2019, 09:21:26 AM »
Hi, all!

Within a given FSM, what would be the best way to check that another FSM has ended before proceeding to the next state ?

Thanks.
« Last Edit: April 10, 2019, 11:49:29 PM by jeanfabre »

ch1ky3n

  • Junior Playmaker
  • **
  • Posts: 71
    • View Profile
Re: Checking that an FSM has ended
« Reply #1 on: April 10, 2019, 12:30:04 PM »
There are many ways to do it, but first of all, what would be the output if the state reaches the end? or what happens if it is ended?

You could set bool_ThisStateIsEnded is true on the active FSM (The one you wanted to end) at the final state and put Bool Test action (Get FSM Bool) on the other FSM that is waiting for that FSM to end.

or you could use the Send Event > name it eg: "STATE END" at your final state

and on your listener FSM state, use add event > Global Event and pick the event "STATE END"

Good Luck


TVISARL

  • Playmaker Newbie
  • *
  • Posts: 3
    • View Profile
Re: Checking that an FSM has ended
« Reply #2 on: April 10, 2019, 12:57:08 PM »
Thanks.