How Can We Help?

Make a Number Bomb Game

Make a Number Bomb Game

1) Drag an Event block when Codey starts up to the Scripts area.

image

2) Choose Variables category and click “Make a Variable”. Name the variable “Number” and click “OK”.

image

image

3) Add a Variables block set Number to (), and keep default value.

image

4) Add a Looks block show () until scroll done and a Variables block Number.

image

image

5) Add an Events block when button () is pressed, and keep the default value. Add a Variables block change Number by () and also keep the default value.

image

image

6) Add a Speaker block play sound () to apply some sound effects to the game.

image

7) Click the following two blocks to duplicate and add them to the play sound () block.

image

image

8) Add a Control block if () then () to set how the game ends.

image

9) From the Operators category, drag a () > () block and a pick random () to () block. Set the number to 10 and 20. Then add a Variables block Number.

image

image

10) Add a Looks block show image () and draw the following image. Add a Speaker block play sound (), and set the sound to “explosion”.

image

image

image

11) Click “Upload” to upload the program to Codey.

image

12) Have a try!