Coding Conditionals in Scratch

When you code a Scratch project, you sometimes want the sprites to do different things, depending on what is happening in the project.
For example, in the Recycle Game in Unit 5, you used an if-then-else block to add 1 to the score if the user moved the item onto the correct Sprite. Else, the project subtracted 1 from the score.
if else block in scratch
The video below helps to explain the different types of conditional blocks, which are blocks that cause different actions depending on a condition.
The girl is using a different coding language than Scratch, so the blocks look a little different and have different colors, but the ideas are the same.

Scratch game apps are really fun and can be a great way to educate users about big problems!


Follow the video below to make a game where a diver will race against a fish to pick up plastic in the ocean.

This is what the game looks like when finished.

offline video not working – temporary link


You made a Scratch game and learned all about conditional blocks

What ways can you improve or add to the Ocean Plastic Cleanup game?

Try adding one new feature. Here are some suggestions:

  • Test if the diver “wins” the game by getting the health of the fish to 10.  
  • Adding more plastic sprites than just the bottle.
  • Have the plastic bottle “float” through the ocean.
  • Let the fish and the diver move in both directions – right and left.

What else can you add?