Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 107 - KEC_2615
P. 107

    Blocks                                           Function

                                                      when this sprite clicked block runs the script when the
                                                      sprite is clicked. Often used for interactive elements.

                                                      when backdrop switches to () block starts the script

                                                      when the backdrop changes to a specified one. Helps in
                                                      scene transitions.

                                                      when  ()  > () block  triggers  the  script  when the
                                                      microphone detects a volume higher than the set value.

                                                      Useful for sound-based interactions.

                                                      When I receive () block runs the script when a broadcast
                                                      message is received. Enables communication between
                                                      sprites.

                                                      broadcast () block sends a message to all sprites to

                                                      trigger scripts with matching When I Receive () blocks.
                                                      Helps in coordinating actions.

                                                      broadcast  ()  and  wait block  sends a message  and

                                                      pauses the script until all receiving scripts are finished.
                                                      Ensures tasks are completed before proceeding.

                     For example:

                     1.  Creating a script using when Green Flag clicked block:
                       To create a script using when Green Flag clicked block, follow these steps:

                       Step  1        From the Events block, drag                     block.

                       Step  2        From the Motion block, drag                         block.

                       Step  3        Click on the text box to change the number of degrees.

                       Step  4        Click on the       to run the program.

                                                                                      Events, Sound and Basic Animation  105

| 102 103 104 105 106 107 108 109 110 111 112 |