Brick Documentation

⌘K
  1. Home
  2. Brick Documentation
  3. Event
  4. When(...) becomes true

When(…) becomes true

Waits until the specified value or function becomes true and then runs the script.

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

If the animal is now tapped, X is incremented by 1.
When X modulo 2 becomes true, that is, if X is an odd number, the sound Tweet1 is played.

How can we help?