In this add-on, you will program confetti,
snow, leaves, hearts, or stars
to create a fun atmosphere for your animation.
You might use confetti to celebrate a birthday,
snow for wintertime, leaves for autumn,
hearts for Valentine's Day,
or stars for another special day.
To start, program the confetti sprite
to create clones when the flag is clicked.
Then, add a when-flag-clicked block, a forever loop,
then a create-clone and wait block.
If you'd like, make the falling sprite
Add a set-effect block.
Select ghost from the dropdown and type in 50.
Next, program the clone to start at a random spot
at the top of the stage.
Add a when-I-start-as-a-clone block,
a show block, and a go-to-xy block.
The top of the stage is y equals 180, so set y equal to 180.
Set the x to a random value by adding a pick-random block.
Type in negative 240 to 240 in the values.
Click this block stack to test.
Next, program the clones to glide to a random point
near the bottom of the stage, then delete.
Add a glide block
and put pick-random blocks in the x and y values.
In the x side, type in negative 240 and 240,
which are the edges of the stage.
On the y side, type in negative 100 and negative 180.
Negative 180 is the bottom of the stage.
At the bottom of the code stack,
add a delete-this-clone block.
Click the when-flag-clicked block stack to test.
This moves really fast.
Put a larger number in the glide block
to make the sprites glide for longer.
This example uses six seconds.
Click the flag to test again.
Okay, this looks much better, but it's not very exciting.
It would be much more fun
if the falling sprites changed colors.
Add a set-effect block under the go-to block.
Add a pick-random block and type in 0 and 200.
Much better, but it might look more interesting
if the clones were different sizes.
Add a set-size block.
Add another pick-random block and choose a size range.
This example uses 50% to 125%.
Next, program the falling sprite to turn as it falls.
Add a when-I-start-as-a-clone block and a forever loop.
Inside the loop, add a turn block.
Add a pick-random block and type values into it.
This example uses 0 and 180.
Click to test.
That looks a little crazy.
To fix this, add a wait block under the turn block
and adjust the value.
This example uses 0.1 seconds.
Click again to test.
Finally, you might have noticed
the original falling object sprite is not moving.
Only the clones are.
To fix this, add a hide block
under the when-flag-clicked block.
Click the flag to test.
Now the clones show, but the sprite itself is hidden.
This effect makes your animation feel more fun and playful.
Now it's your turn.
Program the falling sprite
to forever create clones of itself
and set its ghost effect.
Make the sprite start at a random point
at the top of the stage,
then fall to a random point near the bottom of the stage.
Program the sprite to set to a random color and size.
Program the sprite to continuously turn
in a random direction as it falls.
Animate a tear falling from the character's face.
Add stars spinning around the character's head.
Animate a heart effect.
Animate the characters' mouths to move when they speak.
Program confetti, snow, hearts, or stars to fall from the sky.
Ask the user a question and program a response.
Sign in to track your progress and earn badges