In this add-on, you’ll program the sports commentator to give the athletes a performanceboost. First, decide what the sports commentatoris going to do to pump up the athletes. In this example, the sports commentator saysa few encouraging words to get each athlete to put on a game face.
Click on the commentator sprite. Drag out a “say” block, and change its text to“Get in the zone!” Try it out. Next, drag out a “switch backdrop to”block from the looks menu. This block tells the computer to switch to a specific backdrop.
To select a new backdrop, click on the stage, then the backdrops tab, and select the “choosebackdrop from library” icon. Choose any backdrop you like! This programuses the “neon tunnel” backdrop. Switch back to the code by clicking on thecommentator sprite, then on the scripts tab. Click on the dropdown menu to see the differentbackdrops, and select “neon tunnel.” Click the block to try it out. Neat!
Reset the backdrop to its original by adding another “switch backdrop to” block. Clickthe dropdown menu, and select the default backdrop-- in this case, “building at MIT.”
To set how long the performance boost lasts, drag out a “wait” block from the controlmenu, and tinker with the value until you like how long it stays in the zone. Keep testingby clicking the block stack. To give the athletes a performance boost atsome point in the program, drag out a “when space key pressed” event, and add it tothe top of the code stack. Press the space key to see it work.
For an extra challenge, add a sound effect that plays when the performance boost kicksin using a “sound” block. Here's the game plan:Add a “say” block and two “switch backdrop to” blocks to the “when space key pressedevent” then, add a “wait” block in between thesetwo blocks.
As an added bonus, add a “play sound” block to add a sound effect to the performance.
Choose an Add-On
Add music that will play while the athletes showcase their moves.
Showcase your Moves
Program the athletes to get active by moving around the stage.
Make the sprites change colors similar to how athletes wear different jerseys.
In the Zone
Program the sports commentator to give the athletes a performance boost.