Control block

forever

Control blocks are color-coded gold and are used to control scripts.

BlockFunction
wait () secondsThe block pauses its script for the specified amount of seconds — the wait can also be a decimal number.
repeat ()Blocks held inside this block will loop a given amount of times, before allowing the script to continue.

If a decimal is put in, the number is rounded up.
foreverBlocks held inside this block will be in a loop — just like the Repeat () block and the Repeat Until () block, except that the loop never ends (unless the stop sign is clicked, the Stop All block is activated, or the stop script block is activated within the loop). Due to this infinite loop, the block has no bump at the bottom; having a bump would be pointless, as the blocks below it would never be activated.
if () thenThe block will check its Boolean condition. If the condition is true, the blocks held inside it will run, and then the script involved will continue. If the condition is false, the code inside the block will be ignored and the script will move on (unlike in the If () Then, Else block). The condition is only checked once; if the condition turns to false while the script inside the block is running, it will keep running until it has finished.
if () then elseThe block will check its Boolean condition: if the condition is true, the code held inside the first C (space) will activate, and then the script will continue; if the condition is false, the code inside the second C will activate (unlike the If () Then block).
wait until ()The block pauses its script until the specified Boolean condition is true.
repeat until ()Blocks held inside this block will loop until the specified Boolean statement is true, in which case the code beneath the block (if any) will execute.
stop ()Depending on the argument, it is either a Cap block (all or this script), or a Stack block (other scripts in sprite). It is the only block that changes its shape.
when I start as cloneIt activates in a clone when it gets created.
create clone of ()It creates a clone of the sprite in the argument. It can also clone the sprite it is running in, creating clones of clones, recursively.
delete this cloneIt deletes the clone it runs in. This block is the only way, besides for clicking the Green Flag or Stop Sign, to delete clones.

This work, “Control Block”, is a derivative of “Control Block” by Scratch, used under CC BY-SA 4.0. “Control Block” is licensed under CC BY-SA 4.0 by STEMpedia.

Content is available under CC BY-SA 4.0 unless otherwise noted.

Related Tutorials, Projects & Documentation
evive-brain

Interfacing evive with PictoBlox

This tutorial discusses how to interface evive with PictoBlox, the evive palette, the two modes for writing scripts in PictoBlox, and how to upload a script to evive.
PictoBlox blocks Scratch how to

Getting Started with PictoBlox

PictoBlox is a programming software based on Scratch, where you can make interactive games, animations or program robots and projects with evive, Arduino, etc..
All articles loaded
No more articles to load
PictoBlox Supported Boards
Extensions
Close Menu
×

Cart