Scripts

Creating a Script

You can create a script by linking several blocks together. To link two blocks together, drag a block right underneath the one to which you want to attach it. You should see a white bar appear like the one in the image below, which just shows you where the block will go after you drop it:

You can run a script by clicking on it. Most scripts cause something to happen on the stage. However, even if nothing happens on the stage, you will know that your script is running if it has a highlighted border around it:

Blocks in a script run in a specific order, from the top of the script to the bottom.

Generally, SNAP waits until one block has finished its job before continuing on to the block below it. (One common exception is blocks that play sounds: a block's job can be to start the sound, which means the block below it will execute while the sound is still playing.

Last updated

Was this helpful?