How to make my machinegun echo?

Hello,

I am trying to make my gun sound have an “aftershock” sound, or echo. The only problem is that the echo has to correspond to the number of shots fired. How would I go about doing this in C#?

Thanks,

-DevFo

Are you storing the number of shotsfired in a variable? A foreach loop should work.

If you have pro you could look into a reverb zone, or use Audacity to bake some echo into some clips, but you could just use Play(.1) or something like that to play a second source with a delay. What do you mean ‘corresponds to number of shots fired’ The more you shoot, the more echos per shot? What’s the exact effect?

A simple solution is the Audio Reverb Zone (available in free Unity too!): select the weapon and add the reverberation effect with menu Component/Audio/Audio Reverb Zone, then select a suitable preset (Mountain, Stoneroom, Cave etc.)