Page 81 - TP_Prime_v2.2_Class_4
P. 81

●  when     clicked  block activates the script when the green flag or
                    Go button is clicked.

                 ●                     block activates the script when the chosen key

                    is pressed. You can choose from the given keys or you can choose
                    the option any from the list.


                 ●                 block activates the script when you click the sprite.                                    More BloCkS in SCratCh


                   Control Blocks

                 They have 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 explained as follows:

                 ●                 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                     79
                                                                                                                          79
                    after the other.

                 ●   The repeat block repeats a set of blocks for a given number of
                    times. This 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 clicked. This block is similar to repeat block and expands
                    automatically to accommodate the blocks you snap inside it.


                                Can i change the position of the Sprite?



                                 Yes, the position can be changed. Let me tell you.





                   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.
   76   77   78   79   80   81   82   83   84   85   86