Construct goes through the event list from top to bottom and checks if the condition is true, otherwise it ignores it.
+ if switch is 1
-> say "1"
+ if switch is 2
-> set switch to 1
-> say "2"
-> set switch to 2
My expectation would be (when switch = 2) what construct would do:
Screen result: "2".
But when I preview this, it seems to also do something with event 1!
I don't understand this.
I tried to replicate this in CC with the following:
+ System: Is global variable 'switch' Equal to 1
-> Text: Set text to "1"
+ System: Is global variable 'switch' Equal to 2
-> System: Set global variable 'switch' to 1
-> Text2: Set text to "2"
-> System: Set global variable 'switch' to 2
+ Button: On Button clicked
-> System: Add 1 to global variable 'switch'
-> Text: Set text to ""
-> Text2: Set text to ""
It works as it should. With 'switch' = 0 both textboxes are empty, with 'switch' = 1 the first one is filled, and with 'switch' = 2 the second one is filled.
It may be .84 or a special case (e.g. if you are using the function object. Functions are aside of the order of events)
Other than that I'm clueless.
Just out of interest, rogerty, why haven't you upgraded to r1.2?
I haven't had a crash with this version for....well, I can't actually remember :)
Develop games in your browser. Powerful, performant & highly capable.
Well you don't have anything telling it not to continuously run through events so it may just be that its running that event again before the variable is switched.