In this add-on, you’ll program your sprites to change colors, similar to how athleteswear different jerseys. First, decide which athlete gets to changeinto more colorful apparel. In this example, athlete2 will be the one to showcase a newuniform. Click on athlete2. The “change effect by” block from the looks menu hasdifferent effects that will make the athlete’s outfit change.
Drag out this block. Right now, it says “change color effect by 25.” Click the block totry it out. Try different values in the block, like 10 or negative 20. If you keep clickingit, your sprite changes colors to look like it’s wearing different outfits.
Sprites can change other effects besides color. Click on the black triangle dropdown to seethe different effects, and select “brightness.” Click the block to try it out. Great! Thesprite’s uniform gets brighter and brighter. In baseball and basketball, the home teamwill typically choose to wear a lighter colored version of its uniform.
In this example, athlete2 wears a variation of its jersey, so it has a slightly differentuniform for “home” and “away” games. Place the “change effect by” block insidethe repeat loop, choose the effect you want, and test your code by clicking on the stack.
Drag out a “clear graphic effects” block to reset your athletes uniform to its originalcolor. Snap it to the bottom of the repeat loop. Click the block stack to check it out.
Notice how the sprite changed colors before returning to normal.
Here's the gameplan: Add “change effect by” and “clear graphiceffects” blocks to the repeat loop.
For an added challenge, use different effects so that your athlete looks its absolute bestwhen it’s performing.
Aggiungi una musica di sottofondo mentre l'atleta sfoggia le sue mosse.
Anima l'atleta facendolo muovere per il palco.
Cambia il colore degli sprite proprio come gli atleti cambiano maglia.
Ordina al cronista sportivo di incoraggiare gli atleti.
Fai i complimenti agli altri
Gli sprite si complimentano a vicenda per le loro mosse.