Step 40: Ship Collision with Big Asteroid

Goal:


If the ship and Big Asteroid touches, then the player loses one life.

Then the Asteroid creates a copy of itself, and then destroys this copy.

Steps:

  1. From Control, place an IF block.
  2. From Sensing, place a touching block inside the IF and set it to ship.
  3. From Variables, place a set to block.
  4. Set the variable to Lives and the amount to -1.
  5. From Control, place a create clone of myself block.
  6. From Control, place a delete this clone.

Code: