The sleeping guard

Try itThings that happen

This guard does nothing at all, until it sees the hero.

​

Press Play, and wait

Press Play Play this script. Nothing happens. The guard just stands there, because stand still is its only step at the start.

The second rule is waiting. Its event has not happened yet.

Wake the guard

  1. Click the little game.
  2. Hold the right arrow key to walk the hero toward the guard.
  3. Watch the guard.

When the hero gets close, the guard sees him. That is the event. So the steps under when I see the {Hero} run: the guard shouts and jumps.

Try it again

Press Stop Stop, then Play Play this script. This time stay where you are. The guard never wakes, because the event never happens.

This section ticks itself when you press Play.

Press Play in the code box to finish this section.