Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: miguelfanclub on February 07, 2018, 04:41:44 AM

Title: Code Flow in Playmaker
Post by: miguelfanclub on February 07, 2018, 04:41:44 AM
A trivial question but to be very sure:

- A state with several actions inside:

-- Action 1
-- Action 2
-- Action 3 (send global event)
-- Action 4

Does the action 4 starts when global event from action 3 is finished?
If that global event fired fires another global event will occur the same?
Is there a way to put a breakpoint in an action rather than a state?



Title: Re: Code Flow in Playmaker
Post by: jeanfabre on February 08, 2018, 02:17:45 AM
Hi,

Good question indeed.

Action 4 will be executed when Action has been called, regardless of it's finished state.

I don't get your second question, but I think the answer is that yes, it will occur in the same frame and code stack of execution.

No way to put a breakpoint on action, it's per state. So move Action 4 into a new state following the current state, then you can breakpoint on action 4, and the process will be identical in terms of execution flow.

NOW, a state has an option to be "sequential" which means each action will wait for the previous action to have finished, and so in that case, Action 4 would only be executed after Action 3 has called finished.

 Bye,

 Jean
Title: Re: Code Flow in Playmaker
Post by: miguelfanclub on February 09, 2018, 02:49:38 AM
Thanks.

Can you tell me how to create a sequential state?
With this, Action 4 in my example, will only start once the global event sent by action 3 is finished, right?
Title: Re: Code Flow in Playmaker
Post by: jeanfabre on February 09, 2018, 03:10:50 AM
Hi,

sequence doc: https://hutonggames.fogbugz.com/default.asp?W1255

Bye,

 Jean