In the picture below you can see I’ve got a destructible mesh tied into a set amount of health. Everything I have done so far is in perfect working order except for ONE thing. So I’ll explain what I want to do and go from there.
I want to destroy an and have it spawn another one when it gets blown up. This works perfectly except for one small problem. After I shoot the , it spawns another one and continues the script. However, if I keep shooting the , it keeps spawning more and more and more and more… . . U get the point.
So when the blows up, and I shoot the debris from the i JUST blew up, it will continue to spawn because the script thinks it keeps getting to 0 or below health. I don’t want this to happen.
If you look at the script, you can see that when the gets to 0 or below health, it will continue the script. How would I get this to stop spawning more then ONE at a ? It’s like shooting an enemy AI, and only asking for one AI to spawn at the same .
When the I want to blow up gets to 0 or below health, how can I have the script spawn a set amount of objects? As it is right now, it keeps spawning until I stop shooting the . Sorry, it’s kind of difficult to explain what I’m asking… Late night trying to figure this out.