From Test-Scratch-Wiki

Translate: - English - Español - 한국어 
The general shape of a Reporter block.

A reporter block is a block that contains a value. These blocks can contain anything, from numbers to strings. Boolean Blocks are a special form of reporter blocks that report either "true" or "false". To quickly view the value of a reporter, simply click it in the editor and a bubble will display the value.


As reporter blocks are values, they are designed to fit wherever a value is needed. This can be anywhere: many blocks have spaces (parameters) within them or drop-down menus capable of inputting reporter blocks. An example:

glide () secs to x: () y: ()

This block can easily be filled with Reporter blocks:

glide (costume #) secs to x: (x position) y: (y position)


There are 37 reporter blocks in Scratch 2.0, as follows:


As Reporter blocks are values, they are used whenever a script needs a certain value. These values can be anything — from X positions to the costume number of a sprite. Reporter blocks also need another block to work; they cannot stack like Stack blocks. They can be used in sprites to perform a certain activity whenever it is loud, whenever the sprite reaches the ceiling (as shown below), etc.

An example is below:

when gf clicked
wait until <(y position) > [200]>
say [I've reached the ceiling!] for (2) secs

Note how the Reporter block is used in the script — the script waits until the Reporter block's value reaches a certain point, and then it continues.