Page 82 - iPlus_Ver_2.0_class_6
P. 82

You can also use the forever and repeat blocks with these blocks.

                         Let us make a small script.
                         Change the Sprite to butterfly and change the backdrop to flowers.





























                  Drag the when green flag clicked block of the Event block to the script area. Drag the forever
                  block of the Control block to the script area and place it below the when green flag clicked block.
                  Drag the move block and put it inside the forever block. Now, drag the if on edge, bounce block
                  and put it inside the forever block.

                  Now, put the control block if…then inside the forever block and snap the sensing block,
                  touching color in the hexagon of the if loop.
                  Now, follow the given script:




























                    The butterfly changes colour and size when it touches the colours selected in the touch block.

                    Similarly, you can create scripts with two Sprites, and they change colour when they touch
                  each other.


                    80
                         iPlus (Ver. 2.0)-VI
   77   78   79   80   81   82   83   84   85   86   87