Page 68 - IT_V5.0_Class6
P. 68

Example 9: Make a sprite draw an octagon.





















                  Example 10: Make a sprite continuously draw a colourful line 10 times and if touch the edges
                  bounce back.






















                     BROADCASTING MESSAGES


                  In Scratch, broadcasting is a method of sending messages between different parts of a project.
                  When a broadcast is triggered, it sends a signal to other sprites, scripts, or parts of the project to
                  perform certain actions based on the broadcast message.

                  Example 11: Create a game where when the player presses the Spacebar key, the backdrop will
                  change and a message is broadcasted.
                  To create this project, add two backdrops and two sprites.

                                  Script for Sprite 1                                 Script for Sprite 2

















                    66    Information Technology (V5.0)-VI
   63   64   65   66   67   68   69   70   71   72   73