Planes Colliding

If the player gets hit by an enemy plane more than 3x, the player loses a life and the main plane should be destroyed

Main plane hits enemy 1

Obj: myplane

If the enemy plane hits the main plane, we want it to do some damage.

Add a Collision with enemy1 event...

  • Create Instance: first set to other (= enemy1 plane), not self (= main plane)
    set object to explosion1, relative so same places as where enemy plane is
  • Destroy Instance: other (enemy plane should disappear, not the main plane)
  • Set Health: take away 30
    If the plane is hit more than 3x, then player loses a life.

Room

Go into your room. Have just enemy1 controller.

Test it out:

  • when the plane and enemy plane collide, there should be a small explosion.
  • the health should go down by 30

other enemy planes

If it works, in the myplane object, duplicate the Collision with enemy1 to create the events for when the plane collides with the other enemy planes.

Go into your room and add enemy2 and enemy3 controllers.