Incr Counter
incr counter:: #c3af00
Category Experimental (in 2.0), Control (in 3.0)
Type Stack
increment counter:: control
The Incr Counter block's appearance in Scratch 3.0.

The incr counter block was a stack block and an experimental block. It incremented the value of the counter by 1, which could be reported with the Counter block and set to 0 with the Clear Counter block. Like all of the other experimental blocks in Scratch 2.0, it was a hidden block, meaning it could not be accessed via the block palette.

This block is still present in Scratch 3.0 as a hidden block, and its functionality was kept intact. Additionally, the block was renamed to "increment counter", and was moved to the Control category.

Workaround

Main article: List of Block Workarounds

This block's functionality can be simulated with the a single change () by () block:

change [counter v] by (1)

The workaround should be used in conjunction with these two workarounds for the Counter and Clear Counter blocks:

(counter) // Counter workaround

set [counter v] to [0] // Clear Counter workaround

See Also

Cookies help us deliver our services. By using our services, you agree to our use of cookies.