Enemy 2 shooting

Enemy 2 Bullets

This plane shoots bullets straight down.

Obj: enemy2 bullet

Create a new object enemy2 bullet 

 Add a Create event...

  • Vertical Speed: set to 8 (= downwards)

Add a Outside Room event: if bullet has left the room, it's destroyed

Enemy2 plane Fires bullets

obj: enemy2

Change the Step event a bit. Add 2 new actions at the end...

  • Test Chance: set sides to "30".
  • Create Instance: object "enemy2 bullet", x = 0, y = 16, relative
    starts firing bullets (down, from center of the plane).

Main Plane hit by bullets

obj: myplane

Go into your myplane object and add a Collision with enemy2 bullet event. If the main plane gets hit, it gets a bit weaker, loses some health.

    • Play Sound (explosion1)
    • Set Health: lose 5 (make sure relative!)
    • Destroy Instance: other = enemy2 bullet

Room

In your room, delete the enemy1 and enemy3 controllers for now. 

Test it out - do the enemy2 planes shoot bullets? Does the main plane's health go down?