Page 53 - 2501_KVS_C-5
P. 53

Aryan: OK! I have understood now. I tried the activity given above, but could
                                    you please tell me how the sprites face each other, since all the “person” sprites
                                    in Scratch face the right side by default?


                     Gowri: Yes, sure, dear! It’s very simple and easy. First, we will learn how to
                     turn the sprite to face another sprite, and then we will learn about the “go to
                     x: y:” block. Let’s get started!


                 5.4 TURNING THE FACE OF THE SPRITE TOWARDS ANOTHER

                 SPRITE —”MOTION” BLOCK
                 Step 1:  Add the sprite from people tab of “Choose a sprite” window.

                 Step 2:  Place the sprite, where you want.
                 Step 3:   To turn the sprite to face another, first click on the sprite, then go to

                             the Costume tab below the menu bar. Choose the “Flip Horizontal” option
                             to change the sprite’s direction.

                 Step 4:  Then click on “code” tab to bring the script area back.


                                    Aryan: Thanks, dear for telling this. but please tell me that what is this “go to”
                                    block and “point in direction block” used in the coding of game of “spaceship”
                                    (figure 5.4).


                     Gowri: Yes, sure, dear! We will definitely learn now what are these “go to”
                     block and “point in direction” block. Let’s learn now these following blocks:


                 5.5 MOVING THE SPRITE  TO A PARTICULAR POSITION—

                 “MOTION” BLOCK
                 Remember that all these blocks are “stack” blocks.

                 5.5.1 “go to…” block
                 This block has drop down menu, having following options:

                     5.5.1.1 “go to random position”

                       This option is used to move the sprite at a random position on the stage. It also
                     behaves like “glide” block with random position.

                     5.5.1.2 “go to mouse pointer”

                     This option is used to move the sprite towards the position of the mouse pointer.









                                                                                      Scratch                       51
   48   49   50   51   52   53   54   55   56   57   58