Can you please help my student animate her bunny sprite?

Hi team,
We are really stuck on how to animate a bunny sprite coming out of a hole - like whack a mole but the bunny is animated. I will upload the code we have already here.
Thanks so much in advance from a newbie.
Sarah
WhackAMole.aia (1.7 MB)

This should get you started, but there is more work to do in sizing the other images

WhackABunny.aia (244.0 KB)

First, let's look at some problems in the code.

Global holelist is supposed to be a list of hole component blocks.
Instead, it is a list of pieces of text.
image

Components can be found at the end of the block pallette for that component. They are usually green, not red.

Procedure MoveRabbit sets a local variable to a random item from global holelist.
But then it ignores that, and instead uses a number (global hole) where it should be using a Sprite component.

image

The app is using global animation as a counter
image
in the animation timer clock.

But a number alone is not a picture
image

Here's a rewrite with generic blocks, a dictionary of hole sprites, and lists of Picture animations to be applied to holes under different circumstances.

Unfortunately, the picture files are different pixel sizes, so the hammer looks tiny compared to the rabbits and holes.

I leave that to you to fix.

Sample run

I built the blocks on top of the @TIMAI2 aia, with his corrections to your hole list.


WhackABunny (1).aia (242.7 KB)

By using the holes as the center of all animation, I was able to ignore the bunny sprite altogether.

The dictionary of sprite animation sequences allowed me to up the number of animated bunnies on the Canvas, as is appropriate for bunnies.