Shark Fishing Game

Step 6 – Catch the fish:

We need to let the Shark catch the Fish.

This code goes on the Fish sprite.

Code helper image
  1. Towards the bottom of the Forever block add in an IF – THEN block
  2. In the IF section, use a light blue touching mouse pointer block
  3. Change mouse pointer to be the Shark 2 sprite - use the drop down
  4. Add a purple hide block to hide the fish when this happens

That should hide the Fish when it's been caught by the Shark. Run the program to make sure.

Show the fish at the start

Code helper imageWe need to reveal the Fish at the start of the game! Otherwise when you run it the Fish won't appear.

  1. Add a purple Show block above the Forever part of the Fish code to make the sprite visible at the start of the game
  2. Add a blue go to random position block above the Forever block as well. This will randomise where the fish starts

You could add the same sort of thing to the Shark or set the shark to always start in the same place (perhaps x: 0 y: 0).