From Test-Scratch-Wiki
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.
Shape
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)
Blocks
There are 37 reporter blocks in Scratch 2.0, as follows:
- X Position
- Y Position
- Direction
- Costume/Background #
- Size
- Volume
- Tempo
- Answer
- Mouse X
- Mouse Y
- Distance to ()
- Timer
- () of ()
- Loudness
- () Sensor Value
- Username
- () + ()
- () - ()
- () * ()
- () / ()
- Pick Random () to ()
- Join ()()
- Letter () of ()
- Length of ()
- () Mod ()
- Round ()
- () of ()
- () (variable)
- () (list)
- Item () of ()
- Length of ()
- Current ()
- Days Since 2000
Use
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.