Hello, I am currently making an FPS game with ACS, and I wish to know how to make a realistic speed of sound system for gunshots and explosions.
Basically, calculate the distance between the source of the sound and the player, this would mean some sort of Client to Server event but I do not have much knowledge about them.
A good example of this system is seen in ArmA 3 or Squad, both of which have some astonishing realism when it comes to accuracy with sounds, including speed of sound. Here's a good example of what I mean:
https://youtu.be/KWyuMpv5VV8?t=35
If anyone could give me a full out tutorial on how to do this, please answer to this or DM me in my Discord: krypto#6969 < Expect it to change since my Nitro subscription will be cancelled at the 29th.
Thank you.
Edit: Forgot about this part which is even more accurate and explains what I mean more clearly. https://youtu.be/KWyuMpv5VV8?t=28
You would use sound properties such as
sound.EmitterSize sound.MaxDistance sound.Volume
When say the bomb explode you would subtract a decrease in these for example
sound.EmitterSize = sound.EmitterSize - 1 sound.MaxDistance = sound.MaxDistance - 1 sound.Volume = sound.Volume -1
or you could Add to these
sound.EmitterSize = sound.EmitterSize + 1 sound.MaxDistance = sound.MaxDistance +1 sound.Volume = sound.Volume +1
To do so similar You could use SoundService But never give up work on the coding until its how you like adjust rollofscales etc. game:GetService("SoundService")