I am currently working on a metroidvania esque game. In it you use a sword to slash at enemies, I’ve implemented my first enemies, but when you slash at them they wont die, the odd thing is, if you slash them in a specific spot it will kill them. If anyone could help me to fix this it would be great, Below is the code for the enemy spawning, the code for attacking, and the code for killing.
Could you link your code please?
Here’s the game link, there’s a bit of a lengthy intro but just walk through that