Can you help me? Holding spacebar to shoot doesn't collide properly
Hi
A newbie question.
I am using the basic shoot em up and have a problem with the laser fire.
I've changed some enemy ships to have to have hit points.
the self.hitpoints-1 decreases them untill they die at 0.
The problem I have is if I tap the spacebar to send three shots at an enemy it dies.
If I hold the spacebar down and a stream of shots hit it it doesn't die.
What is the problem with holding down the laser?
A newbie question.
I am using the basic shoot em up and have a problem with the laser fire.
I've changed some enemy ships to have to have hit points.
the self.hitpoints-1 decreases them untill they die at 0.
The problem I have is if I tap the spacebar to send three shots at an enemy it dies.
If I hold the spacebar down and a stream of shots hit it it doesn't die.
What is the problem with holding down the laser?
Comments
you want it to be when hit points is less then or equal to 0
It sounds like its getting hit so fast its hitpoints are dropping into the negatives before anythign has a chance to register the 0
tried it and it didn't work but I think the issue is that I have multiple actors being spawned that share the same "hitpoints" attribute that are on the screen at the same time.
I seem to get two extremes of behavior;
1. Even though I have hitpoints at 3 they get destroyed on the first hit of the laser.
2. or I can't destroy them
Checked they are all actor, self, attributes