In this add-on, create a colorful trail that falls across the stage.
To start, add a new sprite.
This example uses the star sprite, but you can use any sprite you like.
If you’d like, use the shrink tool to make the sprite a smaller size.
First, make the sprite move across the stage.
Move the sprite to the top left of the screen.
This is its starting position.
Drag out a “go to x y” block.
Next, move the sprite to the far right of the stage.
This is its ending position.
Drag out a glide block and attach it under the "go to x y block." Test it out.
The sprite moves from left to right. Tinker with the values.
Drag out a when key pressed block and attach it to the stack. Set the value to “space”in the dropdown menu.
Next, create multiple clones of the sprite as it moves across the screen.
Go to the control menu and drag out a “create clone of myself” block. To make multipleclones, drag out a repeat loop and put it around the “create clone of myself” block.
Attach it to the bottom of the stack. Test it.
The sprite moves across the screen and nothing else seems to happen. However, when you movethe sprite, you see only one clone underneath. Actually, you can keep dragging them out.
All of the clones are on top of each other! This happens because the sprite glides for3 seconds THEN makes the clones. Click on the stop sign to clear the clones.
To create the effect of cloning the sprite as it moves across the stage, go to events,and drag out another when key pressed block. Click on the dropdown to change it to “space”key. Attach the repeat loop to the new block. Test it out. The sprite now moves and createsclones at the same time. Running the two block stacks at the same time is called parallelism.
Tinker with the values of the repeat loop until the sprite makes clones across the stage.
Clear the stage by pressing the stop sign.
Next, program the clones to fall and disappear. From the Control menu, drag out a “whenI start as a clone” block. Make the sprite fall using the “change y by” block. Enterin a negative value like -5.
From the control menu, drag out a repeat loop and put it around the change y by block. Thiswill make the sprite look like it's falling. Test it out. All the clones stay on stage.
Drag out a delete this clone block and put it under the repeat loop. Tinker with thevalues of the repeat block to change how far the sprite falls.
Next, make the sprite change colors. From the looks menu add a “change effect by “ blockinside the "repeat" loop. test it out. The clones changes colors and fall across thescreen. The last step is to make the original spritedisappear from the top of the stage. Add a “hide” block above the “go to x y”block stack. Add a “show” block under the “when I start as a clone” block.
Now it’s your turn, Make a sprite move across the screen usingGo to x y and glide blocks. Create clones using the “Create clone ofmyself” and “repeat” loops. Make your code stacks run at the same timeusing “when key pressed” blocks. Program your clones to fall, change color,and disappear using: When I start as a clone,change effect, change y,Delete this clone, and repeat.
Choose an Add-On
Create a colorful trail that follows the mouse pointer.
Sign my Scrapbook
Collect friends’ signatures in your scrapbook.
Inside Joke (Challenge)
Program something funny especially for your friend.
Add background music to your project.
Make your sprites show and hide.
Learn how to use the backpack, save images of your project, and present what you’ve built to the larger Scratch community.