In this video, you'll learn how to use the "next costume" block to change the appearanceof the sprite. A sprite, in this case your model, can havemore than one appearance. These different appearances are called costumes. Changinga sprite’s costume can change its appearance slightly, or so much that it looks like anentirely different character or object. Select the sprite in your project, and click thecostumes tab. You'll see that this starter project already includes four different costumes.
If you click on each of the costumes, the sprite on the stage changes into an entirelydifferent character. If you run the code while on the costumestab, you can switch from one costume to the next to change the character when the spritemoves on and off the screen. You can also switch costumes using a codeblock. Click the looks menu, then select the "next costume" block. Every time this blockis clicked, the sprite changes its look. Drag the "next costume" block into the foreverloop to make the sprite switch costumes before it comes on stage. You can see that the orderof the blocks matters. If the "next costume" block is placed after the "glide 1 second”block, the sprite will change costumes *after* gliding onto the stage, which makes the projectlook more like a magic show than a fashion walk! If the "next costume" block comes *before*the “glide” block, the sprite appears to step onto the stage with its new costumealready in place. Put the "next costume" block as the first item inside the forever loop,and the sprite will always switch costumes before moving onto the stage. Code blocksare run in order from the top down, and the order of the blocks can affect the behaviorof your program. You're almost done. The sprites are runningon and off the stage, but in most runway shows, the model stops on stage and poses for a moment.
From the control menu, choose a "wait 1 second" block to make the sprite pause on the stage.
In Scratch, you can edit the numbers in the spaces in certain types of blocks to changewhat happens in your project. These are called “values.” For example, changing the valuein the “glide” block makes the sprite move faster or slower. Try changing the valuein the “wait” block to make the sprite pause for a longer or shorter amount of time.
Experiment with different values in these fields until you find a behavior and speedthat you like. Don’t worry if you tested a solution, andit didn’t work. That happens all the time in computer science! Keep coding, testing,and trying solutions until you find one that works.
Lastly, add a "when flag clicked" block from the events menu to the top of your code stack.
Now the code will start running whenever the green flag is clicked. Plus, this starterproject had some extra code to start you off....see what happens when you click the green flag.
Try clicking on the sprite as it walks across the stage, and find out what happens.
Make your CS First experience more social and fun by sharing what you created todaywith the Scratch community. Before you go, hit the “share” button and write a descriptionof your project so others on Scratch can enjoy it.
Now, it's your turn.
Add “next costume,” “wait,” and “when green flag clicked” blocks.
When you are done, come back to this tab and click the green “next” arrow to move onto the add-ons page, where you can choose different ways to customize your project.