In this lesson, you will learn what each sensing block does.
The sensing blocks are the ones that are colored in light blue. Let’s learn what each block does.
The “touching mouse-pointer?” block
The “touching mouse-pointer” block reports true if sprite is touching mouse-pointer. You can also select “edge” from the drop-down menu.
The “touching color?” block
The “touching color” block reports true if sprite is touching specified color. To choose a color, you can select color from the color palette or use the eye dropper tool to select color from the stage. You will see a circle outline with the color selected from the screen. Move the mouse around to change colors and click to select the color.
The “color is touching color?” block
The “color is touching color” block reports true if the first color is touching the second color. To choose a color, you can select color from the color palette or use the eye dropper tool to select color from the stage. You will see a circle outline with the color selected from the screen. Move the mouse around to change colors and click to select the color.
The “distance to mouse-pointer” block
The “distance to mouse-pointer” block reports distance from the mouse-pointer. If you have another sprite, you can select its name from the drop-down menu to report distance from it.
The “ask and wait” block
The “ask and wait” block asks a question on the screen. After writing the answer in the blank, you have to press the Enter key or click the check mark.
The “answer” block
The “answer” block reports keyboard input from the most recent use of “ask and wait” block. Click the checkbox to see the answer.
The “key space pressed?” block
The “key space pressed?” block reports true if the specified key is pressed. You can select a key from the drop-down menu.
The “mouse down?” block
The “mouse down?” block reports true if the left or right mouse button is pressed.
The “mouse x” block
The “mouse x” block reports the x position of the mouse-pointer. Click the checkbox to see the mouse x.
The “mouse y” block
The “mouse y” block reports the y position of the mouse-pointer. Click the checkbox to see the mouse y.
The “set drag mode draggable” block
The “set drag mode draggable” block makes the sprite draggable when in full-screen. You can select “not draggable” from the drop-down menu if you don’t want to drag the sprite in full-screen.
The “loudness” block
The “loudness” block reports the volume of sounds detected by computer microphone.
Note: Your computer must have a working microphone for this block to work. To see the loudness, click the checkbox.
The “timer” block
The “timer” block reports the value of the timer in seconds. Click the checkbox to see the timer.
The “reset timer” block
The “reset timer” block sets the timer to 0.
The “backdrop # of stage” block
The “backdrop # of stage” block reports the backdrop number of stage. You can select “backdrop name” or “volume” from the drop-down menu and if you have another sprite and select its name from the right drop-down menu, there will be more possibilities for you to select from the left drop-down menu.
The “current year” block
The “current year” block reports the current time. You can select “year”, “month”, “date”, “day of week”, “hour”, “minute”, or “second” from the drop-down menu. Click the checkbox to see the time.
The “days since 2000” block
The “days since 2000” block reports the number of days since 2000.
The “username” block
The “username” block reports the username of the viewer.