Skip to content

Please update your browser

Your browser version is not supported by this site. CS First may not work properly. Learn more

arrow_back Winning Condition!

Transcript

In this add-on, you’ll program the sprite to celebrate when your friend correctly guesses your lie.

First, program the celebration.

There’s lots of different ways to celebrate.

This video will show you two ideas, spinning and changing colors, but use your imagination and the skills you’ve learned in this club to come up with your own!

To make the sprite spin, place a “turn” block from the “motion” menu inside a “repeat” block from the “control” menu.

To face the sprite right-side up after spinning, make it to turn a complete circle, or 360 degrees.

Multiply the number in the “turn” block with the number in the “repeat” block.

The result has to be 360 for the sprite to turn all the way around.

This example uses 36 repeats of turning 10 degrees.

36 times 10 equals 360.

To make the sprite face upright again while you’re testing, click the “point in direction” block in the motion menu.

To make the sprite change colors, use the “change color” effect from the “looks” menu.

Drag it into the scripts area.

Click on the block to see what it does.

The sprite changes color!

To clear that change, click on the “clear graphic effect” block in the looks menu.

To make the sprite repeat changing color, place that block inside the repeat loop.

Place the code you built for your celebration in the “then” section of the “if/else" block.

That way, your sprite will celebrate only if your friend guesses the lie.

Now it’s your turn Program a celebration.

You can: Use the “repeat” loop and the “turn” block to make the sprite spin.

Use the “repeat” loop and the “change color effect by” block to make the sprite flash different colors.

Or, choose your own blocks to create a special celebration for your friend.

Place the celebration in the “then” section of the “if/else” block.

Choose an Add-On
play_circle_filled
Title Page
arrow_forward
play_circle_filled
Winning Condition!
arrow_forward
play_circle_filled
Losing Condition!
arrow_forward
play_circle_filled
Keep Trying!
arrow_forward
play_circle_filled
Personalize Your Sprite
arrow_forward
play_circle_filled
Add Another Question (Challenge)
arrow_forward
arrow_backward Back
Next arrow_forward
Instructions
  1. Choose an Add-On, and click "watch" to learn how to build it.
  2. Once you finish one Add-On, try another one below the video!