Close, but the commands aren’t processed at exactly the same time. I can see how this must be confusing.
The player is actually processing
- The object should move forward 100
- The object should move forward -100. The total move forward to render is now 100 - 100, so move forward 0
If you changed your example to two When Game Starts, the first with Move Forward 300 and the second with Move Forward -400, what would it do? It processes both and executes the Move Forward with the sum of -100.
But the point is that the player is processing both sequentially (one after the other), even if it doesn’t render (display) the result until it has processed both.
This is easier to understand with variables
You suggest the that color is not set to red because both Set Xs happen at the same time and the 2nd Set X “wins”. It can be shown that, in fact, X is first set to 1 and then set to 2 by changing the code (Note, this is different than when the player did not render the Move Forward result until it had the total)
To show that both Set Xs occur, cut & paste the When events so they’re now in this order:
Now the heart does turn red! Why? Because the blocks & events are executed sequentially
Ok, so why did I specifically say to cut & paste to change the order. Well, that was the whole point of my original post. If you had just dragged the events to new position, the code would temporarily look the same, but the order of execution would not have changed and the heart would not turn red! And after closing and reopening the project they’d go back to their original order.
@Liza @awesomeonion @Rodrigo
I hope the confusion demonstrated by just one Hop shows why this is important to fix.