Tutoring

Learn

Resources

Sensing Blocks In Scratch | How Do You Add Sensing Blocks in Scratch?

Updated By

Reviewed By

Scratch programming
Image

Sensing Blocks In Scratch: Scratch is a block-based visual programming language created by Mitchel Resnick at the Lifelong Kindergarten Group at MIT Labs. It is one of the world’s largest coding with over 90 million users as of May 2022. Projects like games, animations, stories, etc. can be made using the blocks and arranging them strategically to run the script. The majority of the users of Scratch are children between the ages of 8 and 16, but it is also very popular among people of all ages. Many experienced coders are users of Scratch and make many interesting creative projects.


This is Chapter 4.6 in the
Scratch Tutorial for Beginners


What Are The Sensing Blocks In Scratch?

Sensing blocks are one of the nine block categories in Scratch programming. The blocks are cyan in color and are used to detect different factors in a project. These blocks are used to identify and measure how objects within a project are interacting with each other or to detect certain keyboard and mouse movements. It has a total of 18 blocks; 3 stack blocks, 5 boolean blocks, and 10 reporter blocks.

Stack blocks are rectangular-shaped blocks that are shaped to fit above and below other blocks. Boolean blocks are elongated hexagonal blocks that report true or false values, and reporter blocks are blocks that report a value. These blocks cannot be placed above or below any other blocks.

Sensing Blocks in Scratch
Sensing Blocks in Scratch

Some of the important sensing blocks in Scratch are:

Touching ()?

This sensing block checks if the sprite is touching the mouse pointer, edge, or another sprite. If the sprite is touching the selected item then the block shows true, if not then it returns false.

touching()?

Touching Color

This block is a boolean-type block. This block checks if the sprite is touching the edge, mouse-pointer, or another sprite. If the sprite is touching the selected object, then the blocks report true; if not, then the blocks report false.

Touching Color

Color () is Touching ()?

This sensing block checks whether the color on the sprite is touching another color, if it is then the blocks report true; if not, then the blocks report false.

Color () is Touching ()

Distance To ()

This block is both a sensing block and a reporter block. This block is used to calculate and report the distance in pixels between sprites. This next block is case-sensitive.

Distance to

Ask () and Wait

As the name suggests, this block is used to ask the user for input and store the information for later retrieval and display on the screen when needed. The question appears in a voice balloon on the screen. The program will wait for you to put in a response.

Ask () and Wait

Answer

This sensing block returns the most recent text inputted with the “Ask () and Wait” block. It is very useful where a script has to refer to what has been inputted.

answer

Key () Pressed?

This sensing block checks if the specified key is pressed to not. If the key is pressed then the blocks report true; if not, then the blocks report false.

key () pressed?

Mouse down?

This sensing block reports if any of the computer mouse is pressed or not.

Mouse X

This sensing block reports the mouse pointer’s current location.

Mouse Y

This sensing block reports the mouse pointer’s current location or the vertical position of the cursor.

mouse()

Set Drag Mode ()

This sensing block sets the sprite to draggable or not draggable.

set drag mode()

Loudness

The sensing block reports how loud the noise is that the microphone receives on a scale of 0 to 100. This block can be used with a microphone.

Timer

This sensing block reports the last time the timer was reset or the amount of time the project was loaded.

loudness and timer

Reset Timer

This sensing block resets the time value to 0.0.

reset timer

() of ()

This sensing block will report the specified value of the specified sprite or the stage.

() of ()

Current Year

This sensing block will report either the year, month, day of the week, hour, minute, or second, depending on the argument.

Days Since 2000

This sensing block reports the number of days since 00:00:00 1 January 2000 (UTC).

Username

This sensing block reports the username viewing the project which can be used for saving the progress in the project.

current year

Different Types of Blocks in Scratch

  1. Motion Blocks
  2. Events Blocks
  3. Looks Blocks
  4. Sound Blocks
  5. Control Blocks
  6. Sensing Blocks
  7. Operator Blocks
  8. Variables Blocks
  9. My Blocks

FAQs on Sensing Blocks In Scratch

What are the sensing blocks in Scratch? 
Sensing blocks are used to identify and measure how objects within a project are interacting with each other or to detect certain keyboard and mouse movements. It is one of the nine blocks and is color-coded cyan.

How to use sensing blocks in Scratch? 
Sensing blocks are mainly used to identify and measure how objects within a project are interacting with each other. To use sensing blocks, simply drag and drop the sensing blocks onto the coding area and arrange them strategically according to your project objective.

What are the stack blocks in Scratch? 
Stack blocks are a type of block in Scratch. They are rectangular-shaped blocks that are shaped to fit above and below other blocks.

Why is Scratch blocked? 
If a user has made a derogatory or offensive comment in the online community, they get blocked for a few minutes. Although they will be able to create projects, they will be blocked from commenting on other posts. If this behaviour continues, then the user might get banned from Scratch.

How to block users on Scratch? 
No one can block any user on Scratch except for the Scratch official team if the user has broken any rules given in the community guidelines.

In Scratch, users don’t have to write long and complex codes in order to create a project as it is a block-based programming language, one of the many reasons why children or any other beginner, with an interest, to learn how to code, opts to start with Scratch. This platform provides a simple and easy-to-understand way to understand and learn about coding.

Get 1-on-1 online Scratch classes
Don't forget to share this post!
tutor Pic
tutor Pic

First Lesson Free

No Credit Card

No Subscription