How To Animate A Sprite In Scratch

This is a step to step guide, explaining how to animate a sprite in Scratch. In this post, in the end, we will achieve an animated sprite, which can move eat, and change colour. Before we begin, you will need an account in Scratch. If you don’t have one then, head to how to create an account in scratch.

What Is A Sprite In Scratch

A sprite is a synonym for a character, and is used In Scratch to symbolise a character.

Choose Your Sprite To Animate

How To Animate A Sprite In Scratch 1

Click the  icon above to choose a new sprite:

How To Animate A Sprite In Scratch 2

Click The Icon To Open Library

Then, select your pet:

How To Animate A Sprite In Scratch 3
You Can Select Any Animal

You can delete the cat with the scissors tool. Click on the scissors, then click on the cat:

How To Animate A Sprite In Scratch 4
Delete Cat If You Want

Or, use the right-click menu (CTRL+click on Mac), and choose ‘delete’.

Choose a Backdrop

Choose where your pet will live.

How To Animate A Sprite In Scratch 5

Click the  icon above to open the Backdrop library:

How To Animate A Sprite In Scratch 6
Click Backdrop button

Then choose the backdrop you want for your pet, such as garden rock:

How To Animate A Sprite In Scratch 7
Choosing Backdrop

Introduce Your Pet

Move your pet where you want it to start.

Use the go-to block to set that position:

How To Animate A Sprite In Scratch 8
Go To x:-60 and y:100

Tip: You can find the x and y value of any point on the Scratch stage by moving your mouse pointer. Look at the x y below the stage:

How To Animate A Sprite In Scratch 9

Have your pet make a sound when you click it.

How To Animate A Sprite In Scratch 10

Click the Sounds tab as mentioned above, then click.

How To Animate A Sprite In Scratch 11
Click Icon

Add a script that plays this sound when you click on your pet.

How To Animate A Sprite In Scratch 12
Pick Sound

You can also have your pet say something when you click on it.

How To Animate A Sprite In Scratch 13
You can have your pet say something

Animate Your Pet

Click the Costumes tab.

If your pet has more than one costume, you can animate it by using the switch costume block.

How To Animate A Sprite In Scratch 14
To Animate
How To Animate A Sprite In Scratch 15

Tip: To add a costume to an animation, click with the Duplicate tool. Then use the drawing tools to edit it.

How To Animate A Sprite In Scratch 16

Time to Eat

Give your pet something to eat.

Click to choose a new sprite:

How To Animate A Sprite In Scratch 17

Then, select food:

How To Animate A Sprite In Scratch 18

To tell your pet when the food sprite is clicked, go to Events, and drag in a when sprite clickedblock. Then, snap on a broadcast block. Choose ‘new message’ from the menu and type in ‘food.’

How To Animate A Sprite In Scratch 19

Now, whenever you click on the food sprite, it will send a message to your pet.

Tip: Add the go-to front block to place your food sprite in front of the pet.

How To Animate A Sprite In Scratch 20

Eat Some Food

Decide what your pet will do when it receives the ‘food’ message.

Go to the Events category and drag out a when I receive a block.

To make your pet glide toward the food, click on the Motion category. Use the glide block to tell your pet where you want it to go.

How To Animate A Sprite In Scratch 21

Tip: You can type in an x and y position. Or drag your pet to where you want it to go, and the x and y within glide (in the blocks palette) will automatically update.

Add another glide block at the end of the script to make your pet go back to its original position.

How To Animate A Sprite In Scratch 22

Time to Play

Choose something for your pet to play with, such as a trampoline.

How To Animate A Sprite In Scratch 23

Go to Events. Drag in a when sprite clicked the block. Then add a broadcast block. Choose ‘new message’ and call it ‘play.’

How To Animate A Sprite In Scratch 24

Now decide what your pet will do when it receives the ‘play’ message. For example, you can have your pet jump up and down.

Click to select your pet

How To Animate A Sprite In Scratch 25

Here’s a script that glides to a trampoline and jumps:

How To Animate A Sprite In Scratch 26

Add More Activities

What else do you want your pet to do? You can use broadcast and receive blocks to add other activities.

Here are a couple of ideas. Feel free to experiment.

Play a musical instrument:

How To Animate A Sprite In Scratch 27

Choose a drum and add a script for your pet to play it:

How To Animate A Sprite In Scratch 28

Drink some water:

How To Animate A Sprite In Scratch 29
How To Animate A Sprite In Scratch 30

Monitor Your Pet

You can use variable blocks to monitor how your pet is feeling.

For example, to monitor if your pet is hungry, go to Data and click on ‘Make a Variable.’ Type in something like ‘Hungry.’

How To Animate A Sprite In Scratch 31

You can use a script like this so that your pet gets hungrier over time:

How To Animate A Sprite In Scratch 32

To make it less hungry, add this block to the ‘when I receive food’ script:

How To Animate A Sprite In Scratch 33

You could also monitor if your pet is thirsty, sleepy, or bored.

If you want more information, go to https://en.scratch-wiki.info/wiki/Animating_a_Sprite .

Trushil Shah

Author: Trushil Shah

My name is Trushil Shah and I am 10 years old. I live in Australia, a multicultural country. I have a little sister. Here are many things I like to do, to see, and to experience. I like to play sports, study, do technology experiencing, go out into the world, read, write, see the lunar eclipses by a glimpse, share time with my family, code in scratch and most of all have fun. I like flowers in spring, rain in summer, leaves in autumn, and snow in winter. I want to be a doctor or engineer when I grow up. I like many different types of food. My favourite subject of all is Maths. I am always trying to do my best. Whatever I do I want to do best.

43 thoughts on “How To Animate A Sprite In Scratch

  1. Pingback: TXU Energy plans
  2. Pingback: 툰코
  3. Pingback: directory
  4. Pingback: cach bat de kep
  5. Pingback: keo chap bong da
  6. Pingback: UNICCSHOP.BAZAR
  7. Pingback: pinewswire
  8. Pingback: 토토사이트
  9. Pingback: Small child
  10. Pingback: Immediate Edge
  11. Pingback: Plumber Near Me
  12. Pingback: Phil Down

Leave a Reply

Your email address will not be published. Required fields are marked *