Destroy my enemies

I’m trying to make enemies spawn and for my projectiles to destroy them but for some reason the behavior isn’t working. I’m not sure if I’m doing it wrong or if it’s a glitch but every time I throw a snowball it does no damage. I worked it to where it will now destroy an enemy but then the others don’t respond. I just want enemies to spawn continuously and for the projectiles to be able to destroy them. I’d prefer there to be a limit on the spawns but I can’t get past getting them destroyed. It’s been incredibly frustrating and I’ve watched tutorials and looked at past forums so I’m at my wits end here.

Post a link to your game.

https://flowlab.io/game/play/1050886

I’m having two problems, and I’ve tried to look everywhere to find help. I got the enemy to be destroyed with projectiles, but I cannot spawn multiple enemies in random locations. Also, the alert box is not working properly. I’m sure it’s something I’m doing but I want there to be an alert triggered if the player gets hit by an enemy. I tried to keep this a fairly simple game.

So to update, I am able to spawn enemies at two separate locations as a way to work around not being able to spawn randomly. Alert box is still not working but now my enemies are not destroyed after being hit with a projectile. It’s like I fix one problem and three new problems emerge!

Okay well I figured it out. Apparently I had created multiple types of the same enemy and the coding wasn’t working.