Speedy slime

ChallengeYour first script

This is your first challenge. A challenge gives you a script to fix. It has goals, which show under the little game. You finish the section when every goal has a tick.

What should happen

When the script is right, the game goes like this.

  1. The game starts. The slime walks 3 blocks to the left, up to the hero.
  2. The slime walks 3 blocks to the right, back to where it began.
  3. It is home again before 6 seconds are up.

What happens now

The slime is far too slow. It takes 8 seconds to walk each way, so the whole trip takes 16 seconds.

How to fix it

You change a time by picking a new one from a list.

  1. Look at the top left of the code box. Press Code Code, if it is not picked already.
  2. In the first walk line, click 8 seconds. A list of times drops down.
  3. Click a smaller time in the list. The line changes.
  4. Do the same for 8 seconds in the second walk line.

The two times must add up to 6 seconds or less. Leave 3 blocks alone: the slime still has to walk all the way.

Goals0 of 2 passed

  • The slime gets across to the hero: not checked yet
  • The slime is back home in 6 seconds: not checked yet

Press Play and make every goal pass. A goal is checked when its moment in the game comes.

Test it

  1. Press Play Play this script, under the little game.
  2. Watch the slime, and count to 6. The goals are checked 6 seconds after the game starts.
  3. Look at the goals under the little game.
If this goal has a crossWhat to change
The slime gets across to the heroThe walk to the left takes too long. Give it fewer seconds.
The slime is back home in 6 secondsThe two times add up to more than 6. Make one of them smaller.

Press Stop Stop, change a time, and press Play again. Have as many goes as you like.

Make every goal and every test pass to finish this section.