Event Block

Events blocks are color-coded burnt orange and are used to sense events, which trigger scripts to run. Event blocks are essential for every project: without the hat blocks from this category, a project would not be able to begin except by manually running scripts.



when flag clickedScripts that wear this block will activate once the Green Flag has been clicked — these scripts can activate other scripts and enable the entire program.

Without this block, the only way a project could run would be that it would sense the pressing of a key or clicking a sprite; the project would only last until all scripts depending on the starting scripts have ended.
when () key pressed hatScripts placed underneath this block will activate when the specified key is pressed.

when backdrop swithes to ()Scripts that wear this block will be triggered once the specified backdrop has been switched to on the Stage.

when this sprite clickedScripts that wear the block will activate once its sprite or clone of the sprite is clicked. Contrary to its definite name, the block will also execute the clone's script when the clone is clicked on.

when I received ()Scripts that begin with this block will be invoked once the specified broadcast has been sent by a calling script.

If a Forever block is sending the broadcast faster than the attached script can finish running, the script will restart without reaching the blocks at the end. This can be avoided by using Broadcast () and Wait.
broadcast ()The block sends a broadcast throughout the whole Scratch program. Any scripts in any sprites that are hatted with the When I Receive () block that is set to a specified broadcast will activate. This broadcast block lets scripts send broadcasts without any waits in its script (unlike the Broadcast () and Wait block). Broadcasts are a good way to have sprites and scripts communicate.

breadcast () and waitThe block sends a broadcast throughout the whole Scratch project — any scripts that are halted with the When I Receive () block and are set to the broadcast will activate. This broadcast block lets scripts send broadcasts, and have them wait until all scripts activated by the broadcast end

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

This helped
This didn't help

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

Related Tutorials, Projects & Documentation

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
Close Menu