In this add-on, you'll program
a weather feature for your project.
To start, add or draw a new sprite
that will fall from the sky.
This example adds a snowflake,
but you can add anything you like.
Make the sprite fit properly on the stage.
Next, program the sprite to fall from the sky.
Add a go to X Y block, to the script editor.
Then, drag out a pick random block.
To make the sprite start from a random spot
at the top of the screen,
put the pick random block inside the X value
of the go to X Y block.
Type -240 and +240 in the value spaces
in the pick random block to represent the far right
and far left edges of the stage.
In the Y value, type in 180, which is the top of the stage.
Test it out.
To make the object fall, add a change Y block.
And enter a negative value.
The object should fall until it reaches
the bottom of the stage,
so add a repeat until loop around the change Y block.
Add a less than operator in the condition field.
Put a Y position block from the motion menu
on the left side.
And enter a Y value on the right side,
in a spot close to the bottom of the stage, like -170.
Now, add more snowflakes by cloning this sprite.
Add a one flag clicked event, then a forever loop.
And put create clone of myself, and wait blocks inside it.
Tinker with the value in the wait block
to make the sprite fall more or less frequently.
Then, add a when I start as a clone block
to the top of the go to X Y block.
Cool, the sprites fall in a flurry.
To delete the clones when they reach the ground,
add a delete this clone block under the repeat until block.
Feel free to add a wait block
before the delete this clone block
to delay the sprite from disappearing.
You could also add clouds
to cover the sprite's starting point.
To make it look like it's storming.
Consider adding a go back layers block, a set size block,
and pick random blocks
to make this look even more realistic.
This way, some clones fall behind the android,
and some fall in front of it.
The clones also vary in size.
Now it's your turn.
Add a new sprite that will fall from the sky.
Program the sprite to fall and clone itself.
Customize the sprite's falling using more pick random
and wait blocks, a go back layer block,
and a set size block.
Program a sunrise or sunset for your story.
Program objects to fall from the sky.
Add background music which fades in and out.
Add a slow motion effect to your android.
Use the drawing tools to add your own animation.
Interact with the user of your program.
Sign in to save your project and track your progress.