How do I stop enemies from becoming immortal?

0 favourites
  • 3 posts
From the Asset Store
Pixel Enemies for SHMUP consists of 38 enemy ship sprites to be used in your game.
  • Basically when I was experimenting with guns in my game. I found a little bug thing that I haven't been able to figure out how to fix.

    Subscribe to Construct videos now

    Here's a few screenshots that might help

  • Never use "Trigger once" with objects that have multiple instances, like enemies in your case. It will always work incorrectly and cause bugs.

    I suggest that you check for Health<=0 in a sub-event under the event where you deal damage to the enemy. Instead of "Is overlapping + Trigger once" do this:

    Bullet On Collision with Enemy
    .......Bullet destroy
    .......Enemy subtract 2 from health
    
    .......Enemy Compare variable health<=0 
    ................... (all the actions to kill the enemy here)
    
  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Its working now!

    I did have the bullet damage event thing 'On Collision' before but it wasn't working either. So it was probably the enemy death thing causing the problem. I have the bullet event set to 'On Collision' and the enemy death event as a sub-event of that event AND its working!

    So, Thanks for helping me out :)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)