Lesson 3 of 8
Waiting for something to happen
Show on a big screenTap Run and the game ends before your finger leaves the screen. A game must wait for you.
when tapped, add 1. Step 1 of 4
- A group waits:
when tapped, add 1. - Tap the mango.
- The group starts.
- It runs.
scorebecomes 1.
An event is one thing that happens. A tap, a key press or a click is an event. The flag is the button that starts a game.
An event block names one event. The blocks under it form a group. The group runs when that event happens.
Rule: An event block names one happening. Its group runs only when that happening comes. So the game can wait for your tap.
A program can have many groups. Each waits for its own event.
Three groups wait. Make score end at 6. Use each event once at most.
Loading lab…
Try the lab to finish this lesson.