Lets allow the player to pop the balloons!
Click on your balloon sprite, and then click the Costumes tab. You can delete all of the other costumes, just leaving 1 balloon costume. Add a new costume, by clicking Paint new costume and create a new costume called burst
.
Make sure that your balloon switches to the right costume when the game starts. Your code should now look like this:
To allow the player to burst a balloon, add this code:
Test out your project. Can you pop the balloon? Does it work as you expected?
You’ll need to improve this code, so that when the balloon is clicked, it shows the
costume for a short time, and is then hidden.burst
You can make all of this happen by changing your balloon when sprite clicked
code to this:
Now that you’re deleting the balloon when it’s clicked, you’ll also need to add a show
block to the start of the when flag clicked
code.
Try popping a balloon again, to check that it works properly.