Sensing Blocks – List
Blocks | Description |
The block checks if its sprite is touching the mouse-pointer, edge, or another sprite (a reporter block which returns the sprite’s name, usually a variable can be used). If the sprite is touching the selected object, the block returns true; if it is not, it returns | |
The block checks whether its sprite is touching a specified If it is, the block returns true. | |
The block checks whether its sprite is touching a specified If it is, the block returns true. | |
The block reports the Euclidean distance, in pixels, between it and the mouse-pointer or a specified sprite’s costume centre, even if the specified sprite is | |
The block will make the sprite using the block say the question and show an input box at the bottom of the screen. If the question is being asked by the stage or a hidden sprite, the question will appear above the input Scratchers can input text into it and submit it, and the input is stored then in the Answer block. The Answer block automatically updates to most recent input | |
The block returns the most recent text inputted with the Ask () and Wait When nothing has been inputted yet, the value will hold nothing. | |
The block checks if the specified key is If the key is being pressed, the block returns “true”; if it is not, it returns “false”.
The keys available to be used in this block include the entire English alphabet ( a b c etc.), the number keys ( 0 1 2 etc.), the arrow keys ( ← ↑ → ↓ ), and the space key. In the Experimental Viewer, the ↵ Enter key could also be chosen. After an update, this block now includes any option, which allows one to press any key to operate the block. |
|
The block returns if any of the computer mouse buttons are being pressed. | |
The block holds (reports) the mouse- pointer’s current Mouse | |
The block holds (reports) the mouse- pointer’s current Mouse | |
It sets the sprite to draggable or not Before Scratch 3.0, it was not possible to set the draggability of a sprite using a block. This block is not available for the Stage. Upon the release of Scratch 3.0, this became the only way to set sprite to draggable, due to removing the Draggable Sprite Feature. | |
The block reports how loud the noise is that a microphone receives, on a scale of 0 to 100.
To use this block, a microphone must be used, and so a message will appear on the screen, asking for permission to use the microphone. If you deny it, the block will report a loudness of 0 or -1. If you do not have a microphone, earbuds inserted into the microphone port work too. |
|
A sensing block that reports the amount of time since the project was loaded or the timer was last This block is almost always used with the Reset Timer block usually the timer must be reset at the beginning of a project for the Timer block to hold the right value. | |
The block sets the timer’s value back to 0. When this block is present, the project typically utilizes the Timer output block; usually the timer must be reset at the beginning of a project for the Timer block to hold the right value. | |
The block will report a specified value of the specified sprite or the | |
It reports either the current local year, month, date, day of the week, hour, minute, or second, depending on the argument. The block gets the data based on the user’s computer’s clock and it uses 24-hour time. The block was previously called Local () in early versions of the Scratch 2.0 alpha to make it clearer that it uses a user’s local time. | |
It reports the amount of days (and fractions of a day) since 00:00:00.
It is one of the two date/time blocks in Scratch. The other is current (), which reports the date or time. Both these blocks can be worked in unison with one another for a variety of time- related scripts and projects. |
|
It reports the username of the user viewing the project, which can be used for saving progress in a project, either with a variable encoder or cloud lists (once they are released with string-storage capabilities), as well as other purposes. If no user is signed in, this block returns the empty string. |