Step 8: Delete Laser Clone

Goal:


Our laser can now fire, but we need to make sure we don’t clutter our game with unneeded sprites just hanging out on the screen.

We want to delete the laser clones when the reach the top of the screen. If we don’t do this then by the time we are done playing the entire top border of the screen will be filled with them.

Steps:

  1. From Control, place an IF statement block.
  2. From Sensing, place a touching mouse-pointer block in the IF statement, and set it to edge.
  3. From Control, place a wait block inside of the IF block, and set it to 0.1.
  4. From Control, place a delete this clone block.

Code:


Click to replay