Page 79 - PlugGPT_V2.0_C4_Flipbook
P. 79

•  change y by   100  and  change y by   –100  will change the position of Sprite.

                            •  wait  0.2 secs  will pause the script for the specified time before moving

                               to the next block.
                            •   say  Hello!  for  1  secs   will display the message for the specified time.



























                 Clickipedia




                   To find out the x and y position on the stage, move the mouse around and look
                   at the values of x and y on the right corner of the stage.


                 Example 2: Buzzing Bug (Adding Sound)



                 Step 1     Drag the    when     clicked   block from Events blocks menu.

                                         forever
                 Step 2     Drag the                   block from Control blocks menu.



                 Step 3     Now, drag and place the blocks inside the Forever
                            block as shown. Change the values respectively.

                            •   move  50  steps   will change move the Sprite forward.


                            •   play sound pop   will play a pop sound.


                            •  wait  0.2 secs  will pause the script for the specified time before moving

                               to the next block.
                            •    next costume  will change the Sprite’s costume to the next.




                                                                                               More on Scratch       77
   74   75   76   77   78   79   80   81   82   83   84