Step 3

Decreasing lives and updating the text field

We need to constantly update the lives text with the new lives number. Here are the blocks we need:

set text of instance lives text to (from Draw) Create text with (from Operators) number lives (from Variables) Grab those blocks, and drag them into the "Constantly" block as shown. The "set text of instance textfield" block will need to be changed to "instance lives text" by grabbing the "instance lives text" block from Variables.

Now test your game. The lives update when you crash!

results matching ""

    No results matching ""