Step 10: Bomb Reload 1

Goal:


Our bomb is now primed and ready to be fired but we still don’t have a way to get more bombs once we use them.

We will program a timer to give us 1 more bomb every 5 seconds as long as we are below our starting amount.

First we need to set up a loop so that our game is always checking to see if we need more bombs.

Steps:

  1. From Events, place a when green flag clicked block.
  2. From Control, place a forever block.
  3. From Control, place an IF block.

Code:


Click to replay