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 will make the DJ move with the music.

Ya.

To get started, check if your DJ sprite has multiple costumes by clicking on the costumes tab.

If your sprite you chose does not have multiple costumes, you can always add more.

To duplicate a costume, select it in the costumes tab, right click on it and select duplicate.

This makes a copy of the costume so that you can change the colors or manipulate the image however you like.

This example flips the costume so that the DJ sprite has one costume that faces to the left, and one that faces the right.

Once you have a sprite with multiple costumes, add code to make the sprite dance.

Use any combination of move, glide, next costume, change effect by, and wait blocks to achieve the look that you want.

This example uses the change, whirl effect, wait, and next costume block to make the sprite actually dance.

Select the change color effect by 25 block from the looks menu.

From the drop down menu of this block, select whirl effect.

Click the block to see what happens.

Cool, the DJ twists.

You can control the amount of twisting by tinkering with the value in this block.

Play around with it until you find something you like.

Not happy with what you're seeing?

Don't worry.

If you ever want to clear the graphic effects and return your sprite to its original form, just click on the clear graphic effects block in the looks menu.

Once you have a whirl effect, make the sprite twist and untwist by using multiple change whirl effect blocks with opposing values.

To duplicate a block, right click on it and select duplicate.

Change the value in the block to be the opposite or negative value, then connect it to the other change whirl effect block.

This example uses a value of negative 25.

Test the code.

It doesn't like it's doing anything.

The code runs so fast you can't see the sprite twist and untwist.

To fix or debug that, add a wait block between the change whirl effect blocks.

This example uses a short wait value of 0.1 seconds but you can plug in any value you like.

To finish this dance, add another wait block and a next costume block to the block stack.

Test the code by clicking on the block stack.

The DJ's dance looks pretty good, but check in with the values and add other motion and wait blocks to create the DJ dance that you want for your project.

To make the DJ sprite dance forever, go to the control menu, drag out a forever loop, and place it around the dance block stack.

Finally, add a when green flag clicked event at the top of your stack to tell the computer when to run the code.

Test the code by clicking the green flag.

Ya.

(simple hip-hop music)

Cool, the DJ-- Ya.

Moved to the music.

(simple hip-hop music)

Now it's your turn.

Make sure your DJ sprite has multiple costumes.

If it doesn't, add more by duplicating the costume and editing it with the paint editor.

Use any combination of change graphic effect by, move, glide, mix costume, and wait blocks to create a dance.

And lastly, add a forever loop and a when green flag clicked event to make the DJ sprite dance forever and tell the computer when to run the code.

Choose an Add-On
DJ Dancer
Make your DJ dance and twist.
Dancers
Add a dancer sprite that has multiple costumes, and give it some moves.
Light Show
Add a light show to your DJ's performance.
Crowd Pleaser
Program an audience for your DJ.
Switch the Background Track
Switch the background track from within your project.
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!