In this lab, you will use costumes and movement to create simple animations.
-
In a new project, click on the file menu, then click costumes. Import the costumes
dog2a
anddog2b
. -
Write a script to make the sprite change costume each time the space bar is pressed. (The sprite should switch back and forth between the two costumes.)
-
Add to your script so that when the left arrow is pressed the sprite
- Face to the left.
- Move a few steps.
- Change costume when the
left arrow
key is pressed.
In your window, the dog should look like it is walking when you press the left arrow key repeatedly.
-
Enhance your script to look as though the dog can walk to the right when you click the
right arrow
key.
-
Create a new sprite. Following the same steps as in part 1, import the costumes
dragon1-a
anddragon1-b
. -
Write a script to make the sprite appear to breathe fire when the
f
key is pressed. The sprite should switch to thedragon1-b
costume for a few seconds, then switch back to thedragon1-a
costume. -
Modify your script so that the dragon
attacks
the mouse pointer when thef
key is pressed. When thef
key is pressed, the dragon should take the following actions in order:- Make sure it is in the
dragon1-a
costume. - Point at the mouse pointer.
- Glide to the mouse pointer's position.
- Change to the
dragon1-b
costume - Pause to breathe fire.
- Change back to the
dragon1-a
costume.
- Make sure it is in the
-
Add another sprite to your program. (This sprite can have any costume you choose).
-
Write a script to make this new sprite point away from the dragon and move when the
r
key is pressed. -
Using the broadcast and when I receive blocks, modify your program so that instead of moving when the
r
key is pressed, the new sprite moves when the dragon attacks. The fleeing sprite should move when the dragon starts breathing fire. -
Add a second sprite that runs away from the dragon as well.
-
Save your project as Lab1.4.
-
Select the stage icon.
-
Select file icon then import
-
Now select a picture from your computer to make the background of your project.
-
Download this image if you do not have one to use.
Criteria | Points |
---|---|
2.2 Dragon breathes fire | 0.25 |
2.3 Dragon attacks mouse pointer correctly | 0.75 |
3.2 A sprite runs away from dragon | 0.25 |
3.3 Sprite runs away when dragon breathes fire | 0.25 |
3.3 Use of the broadcast and when I receive blocks |
0.25 |
3.4 Another sprite runs away too | 0.25 |
4.0 Setting the stage | .50 |
Total | 2.5 |