Project 441: Protect The Castle

6. Create a castle health variable

The enemies are hitting the castle, but nothing's happening yet. Maybe the castle's health should go down when it gets hit by an enemy? To make this work, we need to first create a variable to keep track of the castle's health. Make a new variable called 'Castle Health'. Have the variable start each game at 50.
Starting point file for this challenge

Your goal

Steps

1. Create a new variable

Go to the orange "Variables" section and make a variable called Castle Health.

2. Set castle health to 50 at the start of each game

Use a "set Castle Health to 0" block, and change the 0 to a 50.