Scratch Silver III
Scratch Silver II
SCRATCH SILVER I
SCRATCH GOLD III
1 of 3

4.05 Add a predator

Now you can add a predator that will be able to eat a few of the clones.

You need to decide on the type of predator you want to choose, as this may affect the way it will move.

A land-based predator might move randomly back and forth along the ground, but a flying predator might move randomly through the air.

Choose, upload, or paint your predator sprite.

Add scrolling to your predator sprite, so that it appears to move as the background moves. You can change the change x by values to change the predator’s speed.

Animate your predator so that it moves randomly on the Stage, in addition to the scrolling.

The following blocks will cause a sprite to fly randomly around the Stage. You can adjust the values to change the speed of the sprite.

The following blocks will make a sprite move randomly along the x axis (horizontally). You will need a variable to store if the sprite is moving left or right.

To finish off, you can make the clones disappear when they come into contact with the predator. If you chose to add a score variable, then maybe the score is reduced each time. If you chose to make the clones increase in size when they eat some food, then maybe they can be reduced in size.

×
×

Cart