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 Scenery Change

Choose an Add-On
play_circle_filled
Starting Point
Set the order in which the objects pass by.
arrow_forward
play_circle_filled
Walk to the Beat
Play music when the character moves.
arrow_forward
play_circle_filled
Day & Night
Change the day to night as the character moves forward.
arrow_forward
play_circle_filled
Passing By
Program the objects being passed to respond to the character.
arrow_forward
play_circle_filled
Scenery Change
Set costumes to a random color when they appear.
arrow_forward
  • 1. Parallax Introduction
  • 2. Scrolling Objects
  • 3. Customize Attributes
  • 4. Add More Objects
  • 5. Add-Ons
  • 6. Reflection
  • 7. Wrap-up: Parallax
  • 8. Wrap-up: Share Your Project
  • 9. Wrap-up: Show Your Project
arrow_backward Back Next arrow_forward
Transcript

In this add-on, you will set certain costumes to a random color each time they appear on screen.

This is a challenge add-on, so this video will not give you all the steps, but it will help you get started.

To start, select the "objects" sprite.

Decide which objects will change colors.

In this example, the trees and flowers stay the same color, and the mountain and the house costumes change to a random color each time they appear.

To make this happen, create a conditional statement that says, “if the costume number equals the costume that will change colors, then set the color effect to a random number.”

To change colors for multiple costumes, use an "or" block.

Add this code before the "show" block in the "when I start as clone" blockstack.

You can also program the clones to all set to the same color effect or change to a random color for all the costumes.

Now, it's your turn.

Create a conditional statement that says, if the costume number equals a certain number, then set the color effect to a random number.