Please update your browser
Your browser version is not supported by this site. CS First may not work properly. Learn more.
In this video,
you will program the spray paint sprite
to follow the mouse-pointer
and to leave a trail of paint.
The spray paint sprite is made up of yellow dots,
which, when stamped, resemble spray paint.
Watch this video to learn how to do it.
Then try on your own.
First, make the spray paint sprite follow the mouse-pointer.
Drag the go to mouse-pointer block
into the scripts area to test it.
Click the block to see what it does.
The sprite moves to a spot
as close to the mouse-pointer as possible.
For the graffiti project to work,
the spray paint sprite must follow the mouse-pointer
as it moves across the screen.
Drag out a forever block
and place it around the go to mouse-pointer block.
Now, when you click the block stack,
the spray paint sprite follows the mouse-pointer.
Then, use the stamp block
to make a paint trail appear
behind the spray paint sprite,
just like you did in the Paint with Tera project.
Drag out the stamp block
and add it to the block stack.
Now, when you click the block stack to test it,
the spray paint sprite leaves a trail
that follows the mouse.
Remember from Paint with Tera,
clicking the clear block
clears the paint trails from the stage.
Now it's your turn.
Make the spray paint sprite follow the mouse
using a forever block and a go to mouse-pointer block.
Leave a paint trail behind the mouse-pointer
by using the stamp block.
Sign in to track your progress and earn badges