Raspberry_Pi_Education_Manual

Notes:

Barrier support

Traffic-light box

Now we need our sprites. Import “ lights ” and “ barrier ” from the RPiScratch/Resources/Costumes folder.

Look at the image above, and you’ll see that the “ lights ” sprite has four different costumes. By switching costumes quickly, we can make it look as if the lights are flashing. The last thing we need to do before we start building our script is to import the sound of the level-crossing alarm. To do this, click the Sounds tab, find the sound “ level_crossing_a ” and then use the import function, just as you did with the background.

A beginner’s guide to Scratch

41

Made with FlippingBook flipbook maker