1.4.3 Reporter Blocks (Reporters)

View

Reporter blocks are designed to fit in the input area of other blocks. Reporter blocks come in two shapes and fit only into “holes” of the same shape.

A reporter block is a block that reports or returns a value. This can be anything, from numbers to strings (text). Unlike a stack block, which changes something on the Stage, plays a sound, stops the script, or changes a variable, reporter blocks cannot be placed directly above or below another block. Instead, they are dropped into a number, text or drop-down input When Scratch runs a block with a reporter block inside, it will first run the reporter block to find the value of the input.

 

Description

Examples

Reporters with rounded ends:  To quickly view the value of a reporter, simply click it in the editor and Scratch will display the value in a small bubble.

Reporters with pointed ends: to report “Boolean” values (True or False) and fit inside blocks with pointed holes.

A Boolean only checks whether a certain condition is True or False. In this example the Boolean will check if the “space key” is pressed.

   Table 7: Reporter blocks  

 

Some reporter blocks have a check box next to them (figure 1.17). If you click the check box, a monitor appears on the stage, displaying the current value of the reporter. As the value of the reporter changes, the monitor updates automatically.

 

Figure 20: Blocks with checkbox are checked to appear on stage

 

A monitor can display the value of the reporter in several different formats. The following example monitors the value of someone’s age:

Description

Example

A small readout with the name of the reporter

A large readout without any name

A slider that allows you to manipulate the value of the reporter (available only for variables)

Table 8: Different display formats of values returned by reporter blocks 

 

Double-click or right-click on the monitor to bring the slider. The slider format is available only for user-Green Flag

Clicking the Green Flag starts the program you created. It will run all the scripts you have created in your Scratch project at the same time. In presentation mode, the green flag appears as a tiny icon  at the top-right corner of the screen. Pressing the Enter key has the same effect as clicking the Green Flag.


Last modified: Thursday, 23 September 2021, 10:24 AM