Multiple bullets at the same time don't register

I’m using the ‘‘FireBullet’’ extension. My weapon fire rate is 0.01s, shoots very fast, and a single bullet does 5 dmg, but the damage on the boss applies incorrectly. If 2 or more bullets collides at the same time because of the fast fire rate, the boss receives 5 dmg, not 10 or more. The boss damage cooldown is set to 0.001s, so the damage should work, but it doesn’t. What is the issue? If i use different weapons with 0.3 fire rate, it registers correctly. Is there any way to fix this issue? Thank you.

Probably your events. At a guess, you have a bullet collides with enemy detection, along with a trigger once. However, if you can provide a screen shot of your bullet collision events, then a better answer can be provided.

Ok, the issue is that you have the bullet collision and then delete the bullets. If multiple bullets collide with another object at the same time, the damage is only done once and all the bullets are deleted.

The solution is to add a “Repeat for each bullet” as a subevent of each of the bullet collisions and move each of the event’s actions into the new repeat subevent. This will deal with each bullet individually.

like this?

I mean, it kind of works, but not really. I don’t know how to balance the damage now. If I put the damage cooldown on the boss too low, there is a lag spike and the boss receives little dmg, if it’s too high, the boss just melts in seconds. I understand the fire rate is fast, but it still feels wacky.

Imo there is a problem of timing.
bcs there is no trigger once the wait action is triggered endlessly.
If your bullets are too fast it could be that while you’re trying to wait the other bullet hit again and it’s not calculated.
The wait action doesn’t just run in its own event…while u wait other conditions keep running.

also i guess your allbullets collision condition should be a sub event of the repeat for each allbullet

No, because the bullets that collide are deleted. Therefore they will not trigger the event again in the next game frame. Other bullets might, but not the ones that triggered the event this time round.

i don’t mean that.
I was looking at the second group.
When he wait his 2 sec for deleting the dmg the next bullet may hit again and the dmg is still the one of the first bullet.

…but it doesn’t matter anyway… bcs it will never work with that conditions order…
bcs the dmg is not created for each instance.

DamageEnemy is just the damage text that pops up when the enemy takes a hit. Multiple instances can be on the scene at any time.

@Kvoii, you don’t need that 2 second wait. In the second tween, set destroy object when tween finishes:

image

1 Like

It will never works like that.The text will never change at the next hit until that actions
aren’t finished (by tween or whatever) bcs the delay and until is not calculated for each bullet/hit.

i agree with you on this one

It does. It creates a new instance of the text object, sets the text, floats the text and fades it away.

The wait just sends the event into an asynchronous thread that pauses for 2 seconds and then deletes the text object created for that thread. Every time the wait is met, a new thread is created. Another way to look at it is that the event is effectively copied and that copy put aside for 2 seconds before the delete command is actioned. The copy of that event runs independently of the main event, and there can be multiple copies existing at the same time.

I think you’re missing the point.
I agree with everything you said.
but as far as i see on his events this happen
1
It doesn’t matter how many bullets will hit and how many times the text is created because he said to change that text at all bullets collision.

it will never have 5+5+5+5 as he would like for the txt… and his delay actions just complicate things.

it’s like is shooting 1 times even if there are 100 bullets on screen (for the text)…supposing his damage formula is working fine.

that’s what let me think that the problem was idd in his second group of actions bcs the delay.

wait…you’re rite on that one…the text is just generated…so i guess if the formula works it should add the damage.,…

…if all bullets subtract the damage…the text should update meanwhile hes waiting…
…it could be in the text’s creation itself…the more i look at it the more id love a trigger once for the txt…btw you got this. sry for the intrusion it weren’t needed…i had a similar problem just 1 or 2 days ago but i have a different method to check the bullets and subtract the hps.