blackhornet what confuses me is that C2 breaks one rule that programming languages follow:
in traditional programming doThat() will never execute, becase myVar was set to false on line 3 and doThat is after that.
But in construct2 everything seems to execute to the end. DoThat will do it's thing.
Thank you for the examples. I very much appreciate them!
There is only a 'if myVar = true .. doThis()' event possible when there are no objects involved in that event.
Wich is rarely and totaly not the scope of c2.
Read this : https://www.scirra.com/manual/75/how-events-work
Understand that an event is much more then, and very rarely a pure 'if this/then that' situation.
If the condition is true ... it runs its actions.
If the condition picked objects AND if the conditon is true ... It runs its actions on the picked objects. (zero picked objects = no action that actual does something)
If the conditon is true ... AND the action is adressed to a unreferenced object, all instances of that object are adressed.
Sub picking conditon always start with the in the top level event previous picked objects.
Previous picked objects will be forgotten in each top level event.
Refering to programming languages is pointless. Got to forget and read the manual.