Page 96 - Trackpad_V1_Book 5_Flipbook
P. 96

ADDING BLOCK TO ARROW1
                                                                         when      clicked
                  Step  1     Add the following block stack.
                                                                        go to x:  –140   y:  30
                                                                        set size to  80  %




                     when I receive  SpinningStopped    Step  2       Drag  the  when  I  receive  New message
                                                                    block  from  the  Events section  and choose
                                 New message
                                                                    the SpinningStopped option from the drop-
                                 message1                           down list.




                  Step  3       Drag  an  if…then block  from the  Control            if   touching color   ?    then
                              section and place the touching colour block
                              from the Sensing section.




                  Step  4       Click the Color Picker tool to pick the exact colour from the wheel.


                  Step  5       Now, drag a set my variable to 0 block from the            set  my variable   to  Red
                              Variables section and click on the drop-down
                              arrow to open the list.



                       my variable
                                                              Step  6        Select the Winner option from the list
                       Winner                                              and type the name of the colour.

                       Rename variable

                       Delete the "my variable" variable



                                                                                when I receive    SpinningStopped


                  Step  7       Place the set Winner to Red block inside        if    touching color   ?   then
                              the if…then block.                                  set  winner    to  Red



                  Step  8       Complete the code for the Arrow 1 sprite by using an if…then block for all the

                              colours used.











                   94   Trackpad (Version 1.0)-V
   91   92   93   94   95   96   97   98   99   100   101