Page 62 - 2501_KVS_C-5
P. 62

Answers
                  Step 1:  When we open Scratch the sprite, “cat” is already added there. Then

                              click on “Events” block, drag “when flag clicked” block in the script area.
                  Step 2:  Now, do the coding (as shown in Fig.  6.2).


                      Aryan: Oh wow! I understood now how to use the keyboard and mouse to do some specific tasks
                      in the scratch. I liked it very much.

                      Gowri: Let me also tell you how to move the sprite “spaceship” using keyboard keys and create
                      a clone of the sprite “missile” when “space” key is pressed.


                      Aryan: Can you, please tell me the activity of “spaceship” game again, so that I can understand
                      the concept more clearly.










                                                               Gowri: Yes, take another look at the
                                                               activity given below: (See Activity 6.3).








                                  Fig. 6.3




                                Activity 6.3

                    Create a small game of spaceship, where spaceship has 5 lives. In this game,

                    planets are the targets and move towards the spaceship in order to destroy it.
                    The spaceship can fire the missiles when the space key is pressed. Spaceship
                    can also be moved with the help of left, right, up and down arrow keys. When
                    a missile hits the planet, the planet is destroyed. Every destroyed planet will

                    increase the scoreboard by one. Each destroyed planet increases the score
                    by one. When a planet hits the spaceship, one life is lost, and the planet is
                    destroyed. (see Fig. 6.3)













                60                         KVS DELHI REGION 2025
   57   58   59   60   61   62   63   64   65   66   67