Skip to content

Please update your browser

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

Transcript

In this add-on, you’ll program your athletes to get active by showcasing their moves all over the place. First, make the athlete1 show off why it has the best moves of the entire crew. Click on the athlete1 sprite. The “move” block from the "motion" menu allows your sprite to go from place to place.

Drag out this block. Right now it says “move 10 steps.” Click on this block to see what happens. Great! Athlete1 moved 10 steps forward. If you keep clicking it, athlete1 continues to move forward. Your sprite doesn’t always have to move 10 steps. To change how far your sprite moves, change the value in the white bubble to a bigger number. In this example, the sprite moves 20 steps at a time.

Drag out another “move” block. For this block, change the value to negative 20. Click this block. It reverses the direction of the sprite.

Next, program the sprite to move back and forth while changing costumes. Snap both “move” blocks together. Place them inside the “repeat” loop in your original code, and test your code by clicking the stack. The two blocks run so quickly that you can't see the sprite move. Drag out a “wait” block from the control menu to fix this. Place the “wait” block between the two “move” blocks.

Test your code! When you click on the block stack, the sprite changes costumes, moves forward 20 steps, waits 1 second, moves backward 20 steps, waits, then does another move. Tinker with the values in these blocks to get something you like.

Here's the gameplan: Add two “move” blocks to the “repeat” loop. Then, add a “wait” block between these two blocks.

As an added bonus, use multiple “move” and “wait” blocks to make your athlete perform various moves across the stage.

Scegli un’estensione
Musica
Aggiungi una musica di sottofondo mentre l'atleta sfoggia le sue mosse.
Movimento
Anima l'atleta facendolo muovere per il palco.
Colori cangianti
Cambia il colore degli sprite proprio come gli atleti cambiano maglia.
Bel colpo
Ordina al cronista sportivo di incoraggiare gli atleti.
Fai i complimenti agli altri
Gli sprite si complimentano a vicenda per le loro mosse.
Aggiungi un altro atleta
Aggiungi un altro atleta al progetto.
arrow_backward Indietro
Avanti arrow_forward
Istruzioni
  1. Guarda il video di introduzione.
  2. Scorri verso il basso per visualizzare i componenti aggiuntivi scelti.
  3. Seleziona un componente aggiuntivo e inizia a creare!
  4. Scegli un altro componente aggiuntivo e continua a costruire.