playMaker

Author Topic: Best way to use action sequence  (Read 729 times)

Mupp

  • Full Member
  • ***
  • Posts: 167
Best way to use action sequence
« on: February 22, 2021, 07:48:32 PM »
If I understand correctly the difference between using action sequence or not is that it does not start next action until the previous is done. But what about the next state? Will the next state be entered before all actions are done, and does it matter if you use action sequence or not?

So does it matter, regarding speed, if you mix actions that does not require a specific order with actions that do and use action sequence on the whole state?
Or should you separate those to two states, one for the actions that doesn't need action sequence, and then one for those that do?
What is best practice?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Best way to use action sequence
« Reply #1 on: February 23, 2021, 07:34:25 AM »
Hi.
In most cases the difference is so minimalistic that even with 1000 actions you would not notice the difference.

A next state will only start when the previous state has finished all its actions or when a transition event occurs.
so if you would set each action in a separate state it would work as a sequence.
But that could get messy with a lot of states.

Sequence is very use when for example you want to check a float and if between 0 and 1 go to state A then 1 and 2 got to state B then 2 and 3 got to state C.


Mupp

  • Full Member
  • ***
  • Posts: 167
Re: Best way to use action sequence
« Reply #2 on: February 23, 2021, 10:24:45 AM »
Great, good to have it clarified. Thanks.