Page 137 - TGPT_V5.0_C5_Flipbook
P. 137

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.









                Let us make a small script showcasing the use of if,then,...else block.

































                     BROADCAST BLOCK


                The broadcast block is used to send a message from one sprite to other sprites. It allows
                different sprites to communicate and trigger actions based on the message. When a sprite

                broadcasts a message, other sprites that are listening for that specific message can react or
                perform certain actions when they receive it.













                                                 Bat Sprite                     Cat Sprite

                Let us make a small script to demonstrate the use of this block.






                                                                                         Conditional Blocks in Scratch 135
   132   133   134   135   136   137   138   139   140   141   142