Browse By

Scratch – Exploring all the Block: Online Course

Sensing Block


BLOCK
FUNCTION
touching ()The condition for checking if the sprite is touching the mouse-pointer or another sprite.
touching color ()The condition for checking if the sprite is touching a specific color.
color () is touching ()The condition for checking if a color on the sprite is touching a specific color.
distance to ()The block reports the Euclidean distance, in pixels, between it and the mouse-pointer or a specified sprite’s costume center.
ask () and wait An input box appears — you type the value in and it stores the value in the Answer block variables
answerThe most recent input with the Ask () And Wait block.
key () pressedThe block checks if the specified key is pressed. If the key is being pressed, the block returns “true”; if it is not, it returns “false”.
mouse downThe block checks if the computer mouse’s primary button is activated (being clicked).
mouse xThe mouse-pointer’s X position.
mouse yThe mouse-pointer’s Y position.
loudnessHow loud the noise is that the microphone is sensing.
timerHow much time has passed since the Scratch program was opened or the timer reset.
reset timerResets the timer.
() of ()The block will report a specified value of the specified sprite or the Stage.
current ()The specified time unit selected.
days since 2000The number of days since 2000.