Two things at once
Try itThings that happen
One script can wait for more than one event. Each event gets a rule of its own.
Three rules
This script has three rules. A blank line sits between them, to keep them easy to read.
| Rule | Its event | What the guard does |
|---|---|---|
| 1 | The game starts | Stands still. |
| 2 | The guard sees the hero | Shouts and jumps. |
| 3 | The hero swings at the guard | Yelps. |
Set off both events
- Press Play
. - Walk the hero toward the guard. Rule 2 runs.
- Stop about two blocks away and press X to swing. Rule 3 runs.
The order does not matter here
In the last chapter, the order of the steps mattered. The order of the rules does not. The guard is waiting for all its events at once. Whichever happens first, its rule runs first.
Inside a rule, the steps still go from the top down.
This section ticks itself when you press Play
.

