Junior Coders : The Cat Chase

Chase the Mouse


1
  1. Let's make the mouse run!
  2. Every time the cat touches the rat, the rat will move to a random position.

2
  1. Here's a hint! Attach a forever loop to when green flag clicked.
  2. Add if < > then in it to check if the cat is touching the mouse anytime.

3
  1. Use touching [Mouse v] ? as your operator.
  2. When it touches the mouse, use broadcast [chase v] message

4
  1. Now, to tell the mouse to run away, use When I receive [chase v]
  2. Use pick random () to () with go to x:() y:() to make it run away to a random position.
  3. Make sure the mouse can run the farthest it can get within the stage.
  4. To do this, what is the minimum and the maximum x and y coordinates the mouse can reach?

5
  1. Once you're done, click the green flag and chase the mouse.
  2. The mouse should be able to run away!

BACK NEXT