Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: thierry_st_malo on October 02, 2017, 04:49:42 AM

Title: An FSM terminates. OK. Then what?
Post by: thierry_st_malo on October 02, 2017, 04:49:42 AM
Hi, all!

Let's suppose that FSM "A" starts FSM "B" (Enable FSM action). "B" is just a sequence of actions. It sends no events, not even an explicit FINISHED and it doesn't loop on itself.
When "B" has executed its last action it kind of stops, I assume. But then, what happens exactly to "B" and/or "A"? In particular, where does the control (which was in "B") go?

Thanks for your help.
Title: Re: An FSM terminates. OK. Then what?
Post by: djaydino on October 02, 2017, 10:46:17 AM
Hi,
I am not sure what you mean,
but when you play and the state is active, the greyed out actions have done what they suppose to do, if you have an action whit every frame on you will see that it keeps running.

When the fsm's are done they simply do nothing any more, the same way if you would c# scripts :)
Title: Re: An FSM terminates. OK. Then what?
Post by: thierry_st_malo on October 03, 2017, 02:58:08 AM
Understood, thank you. So, enabling an FSM isn't equivalent to calling a subroutine.

Thierry
Title: Re: An FSM terminates. OK. Then what?
Post by: djaydino on October 03, 2017, 11:50:30 AM
Hi,
Maybe you can look into using 'run fsm' , but i never used it myself yet.
(I really should look into it tho  ;) )

I usually use Global events if i need to trigger a sequence multiple times (for exaple when pressing a button)
and 'Set Fsm' Actions if i need to set some variables.