Projectiles not lowering enemy health


I am making a game as an example for my class, and I cannot get the projectiles to make the bossHP go down. Any help would be hugely appreciated.

Thank you,

It seems to be working well. I was able to shoot the purple guy with the fireballs & the boss health went down.

I tried it again, and it is still not working correctly. I think it has something to do with the array I used for my projectiles.


On line 138, you are redeclaring the bossHP variable by using var in front. I think you probably aren’t meaning to do that. Try removing the “var” and see if you can get it to work after that.


Yes! That did it! Thank you so much!