Increment counter: Difference between revisions

From PenguinMod Wiki
Increment counter
Jump to navigation Jump to search
Content added Content deleted
No edit summary
 
(6 intermediate revisions by 2 users not shown)
Line 3: Line 3:
|block_img =
|block_img =
|block_type = Stack Block
|block_type = Stack Block
|category = [[Control Expansion]] (originally Experimental Blocks, moved to [[Control]] in Scratch 3.0)
|category = [[Control Expansion]] (originally Experimental Blocks and called incr counter, moved to [[Control]] in Scratch 3.0)
|title = increment counter
|title = increment counter
}}
}}
The '''increment counter''' block is a stack block that increases the [[counter]] by 1.
The '''increment counter''' block is a stack block that increases the [[counter]] by 1. To get this block, one must add the Control Expansion extension.
==Workaround==
==Workaround==
This block can be worked around by setting the counter to 1 + the current counter by using the [[counter (block)|counter]] reporter block and the [[set counter to ()]] block.
This block can be worked around by setting the counter to 1 + the current counter by using the [[counter (block)|counter]] reporter block and the [[set counter to ()]] block. A variable can also be used as a workaround, by using the [https://en.scratch-wiki.info/wiki/Change_()_by_()_(block) change () by ()] block.

== Trivia ==

* This block is still in Scratch but hidden (since it was experimental) and still can be obtained.

==See also==
==See also==
*[[decrement counter]]
*[[decrement counter]]
Line 15: Line 20:
[[Category:Stack Blocks]]
[[Category:Stack Blocks]]
[[Category:Control Blocks/Expansion]]
[[Category:Control Blocks/Expansion]]
[[Category:Expansion Blocks]]
[[Category:Vanilla Blocks]]

Latest revision as of 16:04, 1 April 2024

Images needed

This article needs images or better quality images. You can help PenguinMod Wiki by adding the images or uploading them. Specifically: There is no image for the workaround or the block itself.

increment counter
...
[[File:|200px]]
Caption
Block Type Stack Block
Category / Extension Control (originally Experimental Blocks and called incr counter, moved to Control in Scratch 3.0)
Status Who tf uses status

The increment counter block is a stack block that increases the counter by 1. To get this block, one must add the Control Expansion extension.

Workaround

This block can be worked around by setting the counter to 1 + the current counter by using the counter reporter block and the set counter to () block. A variable can also be used as a workaround, by using the change () by () block.

Trivia

  • This block is still in Scratch but hidden (since it was experimental) and still can be obtained.

See also