In this add-on, you will draw and program clouds in the sky to make it look like theboat is moving. To start, draw the clouds. Click “paintnew sprite.” Then, click “vector mode” at the bottom of the paint editor. To makeclouds, draw a series of overlapping circles. Select the ellipse tool, the fill option,and your preferred cloud color. Then, draw overlapping circles until you have a cloud-likeshape. If you make a mistake, click the undo button, then keep drawing!
Once you have one cloud, group all the ellipses into one shape. Click the select tool, thenclick and drag to select the entire cloud. Then, click the group tool.
Next, copy the cloud. Click the duplicate button, then click and drag a copy from thecloud shape. The paint editor window is the exact sizeof the stage, so to get the clouds to start and end off the stage, drag each shape soabout half of the cloud is off each edge of the paint editor.
Now that you have a cloud sprite, program it to move.
Click the scripts tab, and the motion menu. Set the sprite’s starting position so thatit’s off the right side of the stage. Drag out a “go to” block. The right edge ofthe stage has an x value of 240. To get the sprite to start off the edge of the stage,set the x value of this block to something large, like 500. You might need to tinkerwith this value again once you’ve got a working program to see what works best.
Next, program the sprite to glide off the left side of the stage. Drag out a “glide”block. The left edge of the stage has a value of negative 240. Set the x value of this blockto a large negative number, like negative 500.
Click this stack to try it out. Great! The clouds flew by. Before tinkering with theclouds’ speed, program them to repeat moving. Click control, and add a forever loop. Clickthe stack to test. Now that you have a loop, tinker with these values while the code isrunning to get a movement you like. The time value in the “glide” block adjusts thespeed, and the x values change the sprites’ starting and ending positions.
To make the clouds appear behind the boat, program the cloud sprite to go to the backof the stage. Click looks, and add a “go back layers” block.
Change the value to 10. Finally, add a “when flag clicked” blockto run this code at the start of the program. Click the flag to test. Awesome!
Now, it’s your turn! Click “paint new sprite,” and select “vectormode.” Draw two clouds using the ellipse, group,and duplicate tools. Start the cloud beyond the right edge of thestage with a “go to” block that contains a large x value.
Glide the cloud past the left side of the stage with a “glide” block that has alarge negative x value. Complete the animation with “forever,”“go back layers,” and “when flag clicked” blocks.
Välj ett tillägg
Add sound effects to your story.
Sun Ray Animation
Draw and animate a sun sprite.
Sink the Ship
Program a sinking ship in your story.
Program a Second Scene for your Story.
Draw and program clouds that move.
Program one or more sprites to move when keys on the keyboard are pressed.