Step 2

Decreasing lives when collisions happen

Since the player's lives will change only when the player character collides with something dangerous, we need to be detecting collisions. We'll use the same blocks we've used for previous collision detections, but we'll get rid of the "go to current level" block.

Once we've detected the collision, we need to decrease the lives number. Here are the blocks we need:

set number lives to (from Variables) number lives (from Variables) - ( + from Operators) Grab those blocks, and drag them underneath the collision detection blocks as shown.

results matching ""

    No results matching ""