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

This add on will create a stylist critic who will be programmed to give feedback on your stylist project.

To start, add a new critic sprite.

Click on choose new sprite from library and add a new sprite.

Next, make a list for this sprite.

Make sure your new sprite is selected.

Choose make a list.

Name your list something related to what it will be about like critique.

In computer science, a list sometimes called an array is a tool that stores multiple pieces of information in one place.

It's similar to a variable but a variable can only hold one value at a time while lists can hold many.

Computer science uses lists in many ways.

For example, artificial intelligence programs store information in the computer that a program will say or output at specific times.

To create a critic list, use the plus button in the list to add phrases that you want the critic to say when they appear on stage.

If you want to delete an item, click inside of it and click the x to remove it.

Add as many items to your list as you'd like.

Make these items things that sound like feedback or comments that someone might say to a stylist.

This project uses, I like this color, I think this could be a bit smaller, you're a great designer, let's change that, looks okay, now this is great.

You can hide or show this list at any time using the checkbox next to the name of the list.

Once you complete your list, code the critic sprite to say random things from it.

Drag out a say block, then place that item of list block inside it.

To make your critic sprite say random items from the list, instead of going down the items in order, add a pick random block from there operator's menu.

Test your code.

When you click on the blocks, the critic says a random item from your critique list.

To make the critic say these items while you're styling, use broadcast and when I receive blocks.

Click on the accessory sprite.

Then from the events menu, drag out a broadcast message block, and add it under the stamp block in your original code.

A broadcast block sends a message to sprites or the backdrop to run specific code which comes in handy when you want to tell sprite when to do something.

The critic will only say something after you place an accessory on your model.

Name your message anything that describes what your broadcast will do like critique.

By clicking on the dropdown inside the block, then clicking new message.

Once you have a name, click on the critic sprite and drag out a when I receive block.

The when I receive block runs the code under it only when the broadcasted message is sent.

Make sure the broadcast and receive messages match.

In this case, they both say critique.

Test your code.

Click the flag, and whenever an accessory is stamped on your model, the critic sprite gives feedback.

To hide your critic until it says something, add show and hide blocks to your code stack.

Adding a show block before the critic says something and hide block at the end makes the critic appear, give feedback, then disappear.

So you can see the entire stage backdrop.

Now it's your turn.

Add a new critic sprite.

Create a list using the add to block.

Code your critic sprite to say random comments from your list whenever an accessory is placed on your model.

Play around with your project and ask a neighbor to test out your code and style your model.

Choose an Add-On
Flashy Mouse
Program your stylist tool create a colorful trail as it moves around the screen.
Stylist Game
Make your stylist tool into a game that lets the user race against the timer to style the model.
Animate Model
Program your model to animate when you place an accessory on it.
Stylist Critique
Create a stylist critic and program it to give feedback for the stylist project.
Sound (Challenge)
Add sound to 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!