Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 124 - 2620_Birla Open Mind C-5
P. 124

    block prompts the user to type the input using the keyboard. It waits for
                     the user input. No other block runs at that time.

                                            block checks if the sprite touches the mouse-pointer, another sprite or

                     the edge. If the answer is true, then it executes the blocks given after it in the condition. If
                     false, then it executes other blocks as per the given condition.

                                     block checks if the sprite is touching the colour chosen in the block. If true,

                     then it executes a set of blocks, else executes another set of blocks.

                                           The block checks if the first chosen color is touching the second chosen
                     colour. If true, then it executes a set of blocks, else executes another set of blocks.

                                         block checks if the chosen key is pressed by the user. If true, then it

                     executes a set of blocks, else executes another set of blocks.
                  Let us create a small script to understand the working of sensing blocks.

                  Sensing an Input

                  To add sensing blocks to the script, follow the given steps:

                      1   Click  on  the  Sensing
                          block category.

                                                                                                  Insert Penguin2
                                                                                                  sprite on  the      2
                                                                                                  stage.

                                                                                                            3
                                                                                    Delete the cat sprite.

                    5   Drag the ask block to the                    Add Arctic backdrop    4
                        script area and click on it.                 to the stage.

                                                                                            Type your name and
                                                                                            click on  the tick button   6
                                                                                            or press the Enter key.

                      122  Premium Edition-V

| 119 120 121 122 123 124 125 126 127 128 129 |