Step 4

Adding animation


Before we add an animation to any of our sprites, we must first add the ‘Animation Extension’ to our project.

You can find it under Advanced > +Extensions

Animate Princess


Add the animation block to our princessAI function and set the variable to Princess.

Lastly we need to change the interval (milliseconds) to 100 and loop to ON

This will make it so our sprite will change frames every 100 milliseconds and repeat forever.

Animate Princess


This next step will set up the frames (images) for our animations.

Animations work by switching to the next image quick enough to make our characters look like they are moving.

Select 4 princess images from the gallery.