Page 89 - TP_Pluse_V2.2_Class4
P. 89

Control Block

                 These are looping blocks which are used when the same blocks have to be repeated for a
                 number of times. The most commonly used control blocks are:

                   wait  1 seconds  block pauses the running of the script for the number of seconds given in the
                   block. You can use this block when two move or speak blocks are coming one after the other.

                    The repeat block repeats a set of blocks for a given number of times. This           repeat  10
                   block is also used to draw shapes where we have to give the same blocks
                   again and again for a number of times.

                    The forever block keeps on repeating a set of blocks till the Stop button is         forever
                   clicked. This block is similar to repeat block and expands automatically to
                   accommodate the blocks you snap inside it.


                                                                                                21 st
                  Let’s Practice                                                              Century   #Technology Literacy
                                                                                               Skills
                   Write the script for the cat sprite to say Meow 10 times without stopping and then

                   move 10 steps.
                     This should happen




















                      a.  When the Go button is clicked,           b.  When the sprite is clicked.




                        SETTING THE SPRITE POSITION


                 The stage is divided into different values of x and y. Each dot on the stage is made up of both x
                 and y values. The value of x gives the horizontal (left to right) location of the Sprite. The value
                 of y gives the vertical (top to bottom) location of the Sprite. The centre of the stage has x and
                 y values as 0.

                 go to x:  -100  y: -34  block helps you to fix the position of the sprite at the beginning of a script.
                 Sometimes due to some scripts, the sprite goes beyond the stage. This block helps to bring the
                 sprite to the desired location.





                                                                                            More Blocks in Scratch  87
   84   85   86   87   88   89   90   91   92   93   94