Animating a Sprite

Ready to make your very first program? Let’s get started!

In this activity, first, we will learn how to add a backdrop and a sprite on the Stage and then create a small animation to make Tobi move around the Stage. Let’s begin.

Choosing a Backdrop

Follow the steps below to add a backdrop.

  1. Click the Choose a Backdrop button.Choose Backdrop
  2. Select the Farm backdrop from the library.Forest Background

And that’s it! Your Stage now looks like a nice huge farm!

Choosing a Sprite

Follow the steps below to add a sprite.

  1. Click the Choose a Sprite button.New Sprite
  2. Tobi, PictoBlox’s default sprite, is already selected.Tobi

Now, let’s animate it!

Setting the Starting Point

Tobi positionWe will set Tobi’s starting position using the following blocks from the Motion palette.starting point

Gliding to Another Point

glidingUsing the following blocks from the Motion palette, we will make Tobi glide to the different points. glide to a position

Adding a Hat Block

From the Events palette, we will add the following hat block. Now, we can control our animation just by clicking the green flag over the stage area.when flag clicked hat block

The entire script looks like this:

Making Tobi Glide

Making Tobi Rotate

Let’s make another small script to make Tobi rotate.

  1. We will use a turn block from the Motion palette and forever block from the Control palette.Make it rotate
  2. Let’s add a hat block on this script too. This one will sense when we click Tobi and make it rotate whenever we do so.Add another hat1

Below is the entire script:Add another hat

Maximize the stage and make Tobi glide & rotate! 🙂Making tobi glide

Saving the Program

  1. To save the program, click on File > Save As.
  2. A window will popup. Choose the location as Desktop or any other relevant folder. Name the file Tobi Walking Animation.

  3. Click on Save.

Assignment

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:

  1. Click on Choose File.
  2. Select the image from the pop-up window that opens up.
  3. Once the image is selected, click on Upload Assignment.
evive Alert
File types allowed is SB3 file generated from the PictoBlox program. The maximum file size allowed is 5 MB.

Good luck!

×
×

Cart

ENROLL FOR YOUR FREE TRIAL CLASS