Page 107 - 2611_SmartGPT Pro V(5.0) C-5
P. 107

ADDING BROADCAST BLOCK

                 To send messages between the sprites, use the broadcast block from the Events section.
                 To add the broadcast block, follow the given steps:


                                         1  Drag a broadcast message1
                                        block into the code area.








                                                                          2  Select the New
                                                                         Message option from
                                                                         the drop-down list.







                            3  Type SpinningStopped in the New
                           message name box and click on OK.


















                                                                         4  Add this block to the code of
                                                                        Wheel sprite after the repeat block.




                           CODE THE ARROW1 SPRITE

                 After broadcasting the message for the Arrow1, we need to add code for the Arrow1 sprite
                 too. To add the code, follow the given steps:

                 Step  1   Click on the Arrow1 Sprite and make it active.

                 Step  2    Click on the Code tab and create the given code blocks.














                                                                                                  More on Scratch  105
   102   103   104   105   106   107   108   109   110   111   112