Make a Number Bomb Game
Make a Number Bomb Game
1) Drag an Event block when Codey starts up to the Scripts area.
2) Choose Variables category and click “Make a Variable”. Name the variable “Number” and click “OK”.
3) Add a Variables block set Number to (), and keep default value.
4) Add a Looks block show () until scroll done and a Variables block Number.
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.
6) Add a Speaker block play sound () to apply some sound effects to the game.
7) Click the following two blocks to duplicate and add them to the play sound () block.
8) Add a Control block if () then () to set how the game ends.
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.
10) Add a Looks block show image () and draw the following image. Add a Speaker block play sound (), and set the sound to “explosion”.
11) Click “Upload” to upload the program to Codey.
12) Have a try!