Simultaneous Behaviours - Compiled or Interpreted?
Hi everyone.
Hopefully this one is easy.
I've noticed that in some demos/tutorials some behaviours are thrown in at the same time.
To pick on TShirt's Follow Path Video:![](https://img.youtube.com/vi/jV21QXylByU/0.jpg)
He uses the new (awesome) write to table behaviours, but on the same rule he does:
-change StepCount to index
-change index to 1
Why wouldn't StepCount become 1? What prevents this from happening?
I'm making a game and i'm putting in some safeguards to make sure that my logic doesn't get messed up, but maybe they are redundant if GS is making priority calls based on what behaviour is written "first".
If anyone could clarify that'd be great, and also if someone from the GS team can confirm that this is not some "bug" but a feature that will be maintained.
Thanks!
Miguel
Hopefully this one is easy.
I've noticed that in some demos/tutorials some behaviours are thrown in at the same time.
To pick on TShirt's Follow Path Video:
![](https://img.youtube.com/vi/jV21QXylByU/0.jpg)
He uses the new (awesome) write to table behaviours, but on the same rule he does:
-change StepCount to index
-change index to 1
Why wouldn't StepCount become 1? What prevents this from happening?
I'm making a game and i'm putting in some safeguards to make sure that my logic doesn't get messed up, but maybe they are redundant if GS is making priority calls based on what behaviour is written "first".
If anyone could clarify that'd be great, and also if someone from the GS team can confirm that this is not some "bug" but a feature that will be maintained.
Thanks!
Miguel
Best Answer
-
tenrdrmer Posts: 9,934
GameSalad reads the rules and behaviors in the actor from the top down. You when the rules conditions are met it will do the change attributes in the order they are inside the rule. They happen nearly simultaneously but in reality they happen 1 at a time