Time for action – cloning bricks
Our task is to take the single brick and continuously duplicate it until we create two solid rows of yellow bricks that span the width of the stage. As we work through the exercise, we'll make a couple of calculations to accomplish the task, and we'll tie it all together after we create the script. Let's follow the given steps for cloning bricks:
Start the script with a when flag clicked block, and add the show block.
We need to specify the starting point of the blocks, so add the go to x: y: () block from the Motion palette. We're going to assume a starting point on the left-hand side of the stage. Set the x: value to -216 and the y: value to 25.
Add a repeat () block, and change the value to 10.
From the Control palette, add the create clone of () block, and choose myself from the drop-down list.
Add a go to x: () y: () block to the create clone of () block.
From the Operators palette, drag the addition block (+) block into the x: value. From the Motion palette...