Page 119 - 2403_Trackpad_V5.1_C5_Fb
P. 119

ADDING ONE MORE SPRITE


                 We need one more sprite in the shape of an arrow that will point to the
                 wheel to show which section has been chosen. To add one more sprite,
                 Click on Add a Sprite button and select Arrow1 sprite from the library.

                                                                                                          Arrow1

                           CODE THE WHEEL SPRITE


                 Now, after adding the sprites and the wheel, we will add the following code for the wheel.
                 To add the code, follow the given steps:

                 Step  1    Click on the Wheel sprite and make it active.

                 Step  2    Click on the Code tab and create the adjoining block stack.




























                 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.





                                                                                          Creating Game in Scratch  117
   114   115   116   117   118   119   120   121   122   123   124