Ok, having an issue here.
I have a fast firing weapon, but it is not that fast.
I have it set up currently so it is playing a loop of fast firing sounds. Then on “not playing” i go to a tail sound. Works perfectly.
If i single tap, the weapon only fires one projectile (i’m talking graphics here - I can see 1 projectile on screen). The problem is that I can hear 2 shots being fired. Or I can hear one shot and then an abrubt tail of the next sound in the loop, before it goes over to the tail of the sound.
If I pitch down the loop, so it is so slow that merely tapping the mouse button will only trigger the first shot of the loop, then when I hold down the mouse button, the audio does not match the visual projectiles at all. The visual projectiles are much faster than the audio loop.
How would you go about solving that problem?
In the past, I had the weapon firing a single event for each projectile, but that resulted way to many instances being spawned, and I have several of these weapons close to each other. (the weapon is scalable and can go very fast).
What would a good solution be?
One solution I could see, is to have the coder to make it so that every first projectile is played as a one shot event, and the next one will be played as a looped event.