Page 68 - Learn To Program With Scratch
P. 68

BalloonBlast_  9.  In this problem, you’ll write the scripts needed to complete the Balloon
             NoCode .sb2     Blast game shown below.





                                                                 These five balloons are clones of
                                                                 the Balloon sprite.



                                                                 The Rocket sprite moves left and
                                                                 right on its own. Hit the spacebar
                                                                 key to launch the rocket.


                                This game contains two sprites, named Balloon and Rocket. When
                             you click the green flag, the Balloon sprite creates the five clones in the
                             interface shown above. The Rocket sprite moves left and right on its
                             own, bouncing off the edges of the Stage. You need to press the space-
                             bar at the right moment to launch the rocket and pop the balloons.
                                Open the file BalloonBlast_NoCode.sb2. This file contains the code
                             for creating the five clones when the game starts. Your task is to com-
                             plete the game by adding the following two scripts.

                                                                          Add this script to
                                                                          the Rocket sprite.

                                        Add this script to
                                        the Balloon sprite.

































           46   Chapter 2
                                           www.it-ebooks.info
   63   64   65   66   67   68   69   70   71   72   73