Adding scores and power-ups

To prepare for the upcoming boss battle (next project), it's a nice touch to power up the player character. A power-up system also offers a better reason for shooting enemies apart from the need for survival.

Engage thrusters

We will assign a score value to each enemy type. The player can increase the score by shooting the enemy of the corresponding type. When the player has defeated enough enemies, the spear will be powered up in some way.

  1. We have three different enemy types, so we will first create the following three new variables to hold the scores. These variables are available for all sprites.
    • scoreRed
    • scoreBlue
    • scoreYellow
  2. Click on the checkboxes in front of the new variables to make them visible on the stage. This ...

Get Scratch 2.0 Game Development HOTSHOT now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.