
Checks if a condition is true, and runs one set of instructions if it is, and another set if it isn’t. It’s like giving two options: “If this is true, do this; otherwise, do that.”

When the scene starts, the variable X is set to 0.

If the animal is now tapped, a check is made to see if X modulo 2 is true, that is, if X is an odd number.
If this is the case, the sound Tweet1 is played and the variable X is incremented by 1.
Else, if X is even, only X is incremented by 1.
The statements to be executed are separated by an End if.

You must be logged in to post a comment.