Now that you have figured out how to make a sprite move, you might be wondering how to make the sprite do other things as well.

To make a sprite do more than just move, we need to use different types of blocks and link them together. You can link blocks by snapping (hence the name Snap!) them together -- drag a block right underneath the one to which you want to attach it. Blocks will snap together when one block’s indentation is near the tab of the one above 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.

Blocks Snapping Together

If you keep attaching blocks together in this way, you will create a script. A Snap! program consists of one or more of these scripts.

Try recreating the following script in the scripting area in Snap!. The purple say... blocks are available from the Looks tab.

You just made a script!

What will happen if you run this script? Remember, a script will tell the sprite what to do. Click on the script and see what happens! You will know that your script is running if it has a highlighted border around it:

Script Running

Be sure to note: 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.