Making a Walking Animation
Now that you know how to move a sprite, let’s do something cool with that!
What is Costume?
A costume is one out of many alternate appearances of a sprite. Sprites can change their look to any of its costumes. They can be named, edited, created, and deleted. Every sprite has at least one costume.
One of the most common uses of costumes is to make an animation for a game or other project.
Activity: Making Tobi Walk
In this activity, we will create a small animation to make Tobi walk by switching between his costumes. Let’s begin!
Opening a New Document
If you are working on an existing script and you want to create a NEW one.
Click on File button and select New. If you haven’t saved your script, save it.
Choosing the Backdrop
Follow the steps below to add a backdrop.
Setting the Starting Point
Moving and Switching Costumes
To make Tobi look like he’s walking, we will use the following blocks:
- move block from the Motion palette
- switch costume from the Looks palette
- wait block from the Control palette. Write 0.1 instead of 1 to make the delay duration shorter
Running the Script Forever
Adding a Hat Block
From the Events palette, we will add the following hat block. It will sense when we click Tobi and make it walk whenever we do so.
Saving the Program
- To save the program, click on File > Save As.
- A window will popup. Choose the location as Desktop or any other relevant folder. Name the file Tobi Walking Animation.
- Click on Save.
Before you move on to the next lesson, a small assignment awaits you!
You must upload the PictoBlox program you wrote in this activity to the website.
Submitting the assignment is a must in order to receive the certificate after completing the course.
Follow the steps below to upload your assignment:
- Click on Choose File.
- Select the image from the pop-up window that opens up.
- Once the image is selected, click on Upload Assignment.