playMaker

Author Topic: Code Flow in Playmaker  (Read 813 times)

miguelfanclub

  • Full Member
  • ***
  • Posts: 152
    • View Profile
Code Flow in Playmaker
« 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?




jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14698
  • Official Playmaker Support
    • View Profile
Re: Code Flow in Playmaker
« Reply #1 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

miguelfanclub

  • Full Member
  • ***
  • Posts: 152
    • View Profile
Re: Code Flow in Playmaker
« Reply #2 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?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14698
  • Official Playmaker Support
    • View Profile
Re: Code Flow in Playmaker
« Reply #3 on: February 09, 2018, 03:10:50 AM »