Time for action – breaking bricks when I start as a clone
Cloning works in Scratch in two major steps. First, we need to duplicate the sprite. Second, we write the scripts that tell the clone what to do.
We created the clones in the previous exercise. Now, let's break the bricks by following the given steps:
From the Control palette, add the when I start as a clone block from the Events palette to the scripts area of the yellow brick sprite to handle the cloned sprites.
We'll need to continuously check if the ball and the clone touch so that we know when the brick is supposed to break.
Start with a forever block, and then add the if () then block from the Control palette.
Inside the if () then block, add the delete clone block from the Control palette, which will represent the breaking brick.
From the Sensing palette, add the touching ()? block to the value of the if () then block, and select ball as the touching value.
The following screenshot shows the new script (on the right-hand side) and...