Both var1 and var2 will be set to 1 but C2 works in a cascading hierarchy. When a layout is started C2 reads down the list top to bottom going through each event so long as the conditions are meet. The important thing to understand about the coding is what events take priority over others.
So if you have something like a bomb we are detonating at random
On Layout Start -> Set var1 == 0
For EveryTick -> Set var1 == round(random(0,9))
On Function "Boom" -> Destroy SpriteBomb & Play Boom sound clip
If var 1 == 5 -> Then do function "Boom"
In this case c2 looks from top to bottom for conditions it first sees On Layout Start which has a green arrow, meaning it is done first. So var1 is set to 0, this is also a condition that triggers once and is done unless the layout is restarted.
next going down it sees EveryTIck, Every Tick is a way to say "Always do this till I say stop" so every moment the game is running it is setting var1 to a random number between 0 and 9, it is also being rounded to a whole number. This event will continue to do its own thing without the program really having to do anything
Next is a Function called "Boom" Since it has not had it triggered it skips it entirely
Next is a condition seeing if var1 is equal to 5. It will bounce back in forth between the Everytick and this condition till the condition is meet. once var1=5 then the function is called and it skips straight to it. Note "Boom" is specific so you can have as many functions in a event sheet as you want and know that one trigger can do more than one action provided that each on function matches the string that the function is called
Finally there is a exploding animation then the sprite is destroyed and then a sound fx is played in that order
Events only matter what order they come in if they have either the same trigger. otherwise most of your event sheet will be inactive but c2 runs that checklist constantly till a condition is meet
I hope this was helpfull