arrow_back Clone Crazy
To earn the Clone Crazy badge, create a sprite that clones itself when clicked, then does something unexpected. For example, when this sprite is clicked, she asks, "How many twins do you want to see?" When the user answers with a number, she creates a bunch of copies of herself and plays random notes. To earn this badge, first add a new sprite to your Musical Talent Show project. Then, build the code that will cause it to ask a question and clone itself. The code you see here reads: "When the sprite is clicked" ask "How many twins do you want to see?" then, wait for an answer. You can have your sprite ask any question you want, though it should encourage the user to enter a number as a response. For example, your sprite could ask "How many people like the music from Frozen?" Next, a repeat loop instructs the sprite to clone, or copy, itself the number of times the user specified. For example, if the user answers "5," then 5 copies of the sprite will be created. If the user answers 50, then 50 copies will be created.
When a clone, or copy, is created, any code under the "when I start as clone" block will run. In this case, using the "go-to" block causes the sprite to move to a random position on the screen. After a clone is created and its code runs, the program waits for 3 seconds, then the clone disappears. Try it out! Great. The sprite is copying herself based on the user's response to her question....but she doesn't do anything surprising. To earn the rest of this badge, make your sprite do something unexpected, so each clone does something slightly different. A good way to accomplish is to place the "pick random" block inside another block. This part of the scavenger hunt is for you to figure out. What will you have the clones do? Make sure to add your code to the "when I start as clone" block and BEFORE the "wait" and "delete this clone" blocks, since you want your clone to do perform an action BEFORE it is deleted. You can have anything you want happen, but here are some ideas: Have the sprite clones randomly change size and colors.
Make the sprite clones change instruments and play random notes. Code sprite clones to turn randomly in a loop when they are created. Or, have them do something totally different.
Don't be afraid to try something new! Now, it's your turn. Add a new sprite. Build the code shown to ask a question and clone your sprite with the answer. Then, add code to make your sprite clones do something surprising. This code isn't shown - it's for you to figure out and decide. Explore, try blocks, and see what happens. Once your sprite clones are doing something unexpected, put up your sticky and ask your CS First Guru to award you the Clone Crazy badge!