In this video, you will make Tera change colors
and duplicate itself across the stage.
To do this, use the Change Color Effect by block
which is in the Looks menu.
Click this block to test it.
Notice that Tera changes colors.
Add this block to the Forever Loop.
When this Forever Loop runs, Tera moves 10 steps.
If touching to edge, it bounces.
Points towards the mouse pointer.
And finally, changes color effect by 25.
Then, the loop runs again from the top.
Test this, and tinker with the value
of the Change Color by block.
Notice that when you change the value to a small number
Tera changes colors slowly.
And when the number's bigger,
the sprite changes colors more quickly.
Now that the sprite follows the mouse pointer
while it changes color, you can make it drop
by stamping each time the loop runs.
To do this, drag a stamp block from the Pen menu
into the Forever Loop.
Test it by clicking the Block stack.
As you move the mouse, a rainbow effect is created
with different colored Tera stamps.
As you play with the sprite, you may notice
that you do not have a way to clear the screen.
Go to the Pen menu pull out the block.
When you click it, the stamps disappear.
If you were to put that block in the Forever Loop
Tera will stop stamping.
That is because each time the Forever Loop runs
Tera moves towards the mouse, changes colors,
stamps, and clears.
Well, it shouldn't clear every time the loop runs.
To fix this, move the block to the beginning of the program.
Now, each time you click the block stack
the stamps clear, then the loops run.
At the moment, the only way to start the program
is to click the code.
To make it easy for other people to use your creation,
add a When Green Flag is Clicked block.
Now it's your turn.
Change Tera's color with the Change Color Effect by block.
Stamp repeatedly with the Forever loop.
And clear the stage when the Green Flag is clicked.
Sign in to track your progress and earn badges