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

The clear counter block was a stack block and an experimental block. It set the value of the counter to 0, which could be reported by the Counter block and increment with the Incr Counter block. Like most experimental counter blocks, 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 is fully functional.[citation needed] The block was moved to the Control category.


Main article: List of Block Workarounds

This block's functionality can still be accessed with a single set () to () block:

set [counter v] to [0]

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

(counter) // Counter workaround

change [counter v] by (0) // Incr Counter workaround

See Also

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