Here’s why it happens:
The set variable and check if statement both take zero frames to occur. I wouldn’t consider this normal behavior, but they take place at the same time instead of in order.
This is not true for the set text however. The set text sets text after the variable is set; even though those occur on the same frame, they occur in order.
App Version(s) affected: 3.37.2
Player Version(s) affected: 1.2.0-1.2.1
DO NOT UPDATE EXISTING PROJECTS TO 1.2.0+
Existing projects will continue to work, but watch out for this
How I discovered it: migrating a copy of a draft to 1.2.1, it backfired at first because of this but will work fine once it’s sorted out. Clone ID.
Why this should be fixed quickly: new and returning users may try to make a game, and one part of the game has a variable to determine the image to set the character to. If they put it right before the if statements (which is naturally what would happen), their set image would act as if the variable was never set.
Good find. By way of explanation, for versions 1.2.0 and above, we made the set variable block occur instantly so that you could perform complex calculations without slowing down the frame rate. That works as intended. However, you’re right, within the frame Hopscotch should respect the order of your blocks.