
Checks if a condition is true, and if it is, runs a set of instructions. It’s like saying, “If this is true, then do this.”

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

If the animal is now tapped, the variable X is increased by 1.
The program checks whether the variable X is equal to the value 2.
If this is the case, the sound Tweet1 is played and the variable X is set to 0.

You must be logged in to post a comment.