Please update your browser
Your browser version is not supported by this site. CS First may not work properly.
In this add-on, you'll program
the sprite to make an impressive entrance.
To start, program the sprite to start off stage
and glide on stage when the program starts.
Drag the sprite to the edge of the stage
and add a go to x y block from the motion menu
under the when flag clicked event.
Drag the sprite to the middle of the stage
and add a glide block under the go to block.
Click the flag to test.
Tinker with the numbers in the seconds value
to make the sprite move faster or slower.
This example uses three seconds.
Next, program the sprite to turn and change color.
Add a turn block.
And from Looks, add a change color effect block
to the scripts area.
Click the block stack to test.
Make the sprite repeatedly turn
and change color for set amount of time.
To do this, select the Control menu and add
a repeat until block around the block stack.
To make the sprite turn and change color
until a certain amount of time has passed
since a program has started, use an operator.
Click the Operator's menu, and add a greater than block.
From the Sensing menu, add a timer block
to the left side of the greater than Operator.
In the right side, type a number.
This example uses three seconds,
which is the same same amount of time
that the sprite glides on the stage.
Tinker with the number in the greater than block
to make the sprite spin
for a longer or shorter amount of time.
From the Events menu, add a when flag clicked event.
That looks cool.
But, the sprite ends at an angle.
To make the sprite stand straight up,
add a point in direction block
under the glide block from the Motion menu.
Make sure 90 is selected in the dropdown menu.
That's better, but the sprite is still a different color.
To return the sprite to its original color,
select Looks, and add a clear graphic effects block
under the repeat until block stack.
Click the flag to test again.
The sprite spins, changes color, and glides on stage,
then returns to its original color and faces upright.
Now it's your turn.
Program the sprite to glide on stage.
Make the sprite repeatedly spin and change color
for a set amount of time
using the repeat until, greater than,
timer, turn, and change color blocks.
Program the sprite to change back to its original color
and stand upright using the clear graphic effects
and point in direction blocks.