Page 77 - PlugGPT_V2.0_C3_Flipbook
P. 77

These blocks are used to play or stop sounds.
                          Sound


                                         These blocks are used to draw shapes and patterns on the
                           Pen           stage, change the pen colour and size.


                                         These blocks control the blocks within your scripts, inserting
                         Control         conditional statements, loops, repeats and pauses.


                                         These blocks identify what's happening at a given point and
                         Sensing         make your sprites or background respond to user actions.


                                         These blocks let you make comparisons between or perform
                        Operators        arithmetic functions on different values.



                     CREATING A SCRIPT


                 A script is another name for a program. Let’s create some scripts.
                 Example 1: Talking and jumping Sprite




                 Step 1     Drag the                block from Events blocks menu. This block will activate

                            once the Green flag is clicked.



                 Step 2     Drag the                   block from Control blocks menu. All blocks inside


                            the forever block run until the Stop button is clicked.
                 Step 3     Now, drag  and place the blocks inside  the  forever block as shown.

                            Change the values respectively.

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


                            •                  and                   will change the position of Sprite.


                            •                  will pause the script for the specified time before moving

                               to the next block.

                            •                           will display the message for the specified time.








                                                                                        Introduction to Scratch      75
   72   73   74   75   76   77   78   79   80   81   82