Page 128 - KEC Khaitan C3 Flipbook
P. 128

Now, put the control block if,then inside the forever block and snap the sensing
                  block, touching color  in the hexagon of the if loop.                                                                                                      HANDS-ON PROJECT

                  Now, follow the given script:
                                                                                                                                            PROJECT: Balloon Pop Game
                  The fish changes colour and size when it touches the colours selected in the touch

                  block.                                                                                                                    Objective:

                  Similarly, you can create scripts with two Sprites, and they change colour when they                                      By the end of this project, you will:
                  touch each other.                                                                                                             Create a fun and interactive balloon-popping

                                                                                                                                                game using Scratch.

                                                                                                                                            •  Learn to use motion, sound, and variables to

                                                                                                                                                make the game dynamic.

                                                                                                                                            •  Develop logical thinking and problem-solving

                                                                                                                                                by tracking scores and adding a timer.

                                                                                                                                            Step-by-Step Instructions:

                                                                                                                                            1.  Set Up the Backdrop:


                                                                                                                                                •  Click on the "Backdrops" tab in the bottom-right corner of the screen.

                                                                                                                                                •  Use the search bar to find a suitable backdrop (e.g., sky or carnival scene).

                                                                                                                                                •  For added creativity, click "Paint" to draw clouds or fun shapes.

                                                                                                                                            2.  Add Balloon Sprites and Movement:

                                                                                                                                                •  Click on the "Choose a Sprite" button and search for the Balloon sprite.


                         REVISIT                                                                                                                •  Drag the  following  blocks  to  the  coding  area  to  make  the  balloon  move
                                                                                                                                                    randomly:


                    ▶  If, then… block executes the commands inside them only if the specified condition is true.                                   o   "When green flag clicked" (from Events).
                    ▶  If, then,…else  block runs the commands inside the Then section if the condition is true and                                     "Forever" (from Control).
                      if the condition is false, it executes the commands in the “Else” section.                                                    o
                    ▶  A program is a group of commands and instructions that tell the computer to carry out a                                      o   "Go to random position" (from Motion).
                      task.
                                                                                                                                                    o   "Wait 1 second" (from Control).
                    ▶  Global variable is created to be used and modified by all the Sprites.
                    ▶  Local variable is created to be used and modified by a single Sprite only.                                           3.  Create a Popping Effect:
                    ▶  Sensing blocks in Scratch sense the input from the keyboard or the mouse at the time of                                  •  Select the Balloon sprite and add the following blocks:
                      execution of a script.
                    ▶  All the numbers, text, dates, or pictures that you use in a program are called data.                                         o   "When this sprite clicked" (from Events).
                                                                                                                                                        "Play sound pop until done" (from Sound).
                                                                                                                                                    o





                  126   Premium Edition-III
   123   124   125   126   127   128   129   130   131   132   133