Step 2: Creating Laser Clones

Goal:


In our game, when the player presses the spacebar key, a clone – or copy – of the laser sprite will appear.

When the clone appears we want to subtract 1 from the “Blaster Shots:” variable, and then wait 0.25 seconds until the next arrow can be shot.

Steps:

  1. Stay on the “Laser” sprite
  2. In Control, place an If statement inside the repeat until block
  3. In Sensing, place a key space pressed block inside the If block
  4. In Control, place a create clone of myself block
  5. In Variables, place a change Blaster Shots by and set it to -1
  6. In Control, place a wait block and change the number to .25

Code:


Click to replay