Forever

Try itDoing it again

Some things in a game should never stop. A slime that keeps jumping makes a good trap.

repeat forever
end

Press Play

Press Play Play this script and watch. The slime jumps, waits, jumps, waits. It will go on for as long as the game runs.

Press Stop Stop when you have seen enough.

What is different

There is no number. repeat forever goes round and round and never reaches its end.

So a step you put after the end would never happen. The slime never gets that far.

Change the pattern

  1. Press Stop Stop.
  2. Look at the top left of the code box. Press Code Code, if it is not picked already.
  3. Click 1 second. A list of times drops down.
  4. Click 2 seconds in the list.
  5. Press Play Play this script.

The slime now waits longer between jumps. The gap is where a hero could run past.

This section ticks itself when you press Play.

Press Play in the code box to finish this section.