Earlier in the project, we talked about which axis we might use to get our enemy moving. Do you remember which coordinates we will have to change for our enemy?
We want to create a bunch of enemies so that we can program movement automatically. Head to the "enemy" sprite, and grab a "when green flag clicked", "forever" loop, "wait 1 seconds" and a "create clone of myself" block. Put them all together and your enemies should make clones every second.
What do you think might happen if we change the variable in the wait 1 second block? Increase the number of clones? Decrease the number of clones? We can test this later.
Now that we've created a bunch of clones, we want to make sure that they are hidden until we have them show up. Grab a "hide" block from the Looks tab and place it before the "forever" loop.
We need to get our clones to show up so they can attack the enemy. First grab the "when I start as a clone" block from the bottom of control, then attach the "looks" block to make the clones show up.
Grab a "go to x: ___ y:___ " block from the Motion Tab. Since we want our clones to begin their fall from the top of the screen, what coordinates will we change? Because the top of the screen has a Y value of 180 , we'll set our block to that as well. We also want them to be able to spawn anywhere along the width of the screen. So we'll need to use a Random Range. Grab a "pick random 1 to 10" block from Operators, and switch it to have the same range of values as the X axis, or -240 to 240.
Anytime we build a large block of code, we want to make sure we test to make sure it's working as intended. At this point, your enemies should spawn, at random on the top of your screen