RE: Sound entities can be heard everywhere in level despite the distance being set
Alright, this seems to work for some reason. As Newsman Waterpaper above said, you'll need to play around with the Min and MaxDistance. The Min is the distance between the sound's origin and, in Level Editor units*, how far away the sound will be its loudest. The Max Distance is the maximum distance the sound can be heard - at least, until the sound reaches 0 volume. Between Max and Min, the sound will fade depending on distance.
Have a graphic I drew in Paint in a few minutes to show what I mean. This is based on the .snt I have in the code below. Volume can be changed (but 0.8 is pretty loud, since I am pretty sure 1.0 is the cap) and the distances should be changed to suit your environment.
This worked for me - but if it still doesn't work, I'll post my poorly created map for you
*Level Editor units being, the standard sized wall is 4 wide and 4 tall. Therefore, a distance of 20 wide would be about 5 default walls.
Previous Post
Spoiler below!
Since I still cannot figure out exactly why it doesn't adjust itself, are you able to take an approach similar to this?
The idea is this:
- Blue: The Player cannot hear the sound
- Green The Player can hear the sound (it's within the area, but unfortunately, still as loud as the volume (0.8f))
- Red The Sound Location, which is technically still green, since it plays around.
I set up a ScriptArea around the green area, which, when entered and exited, plays and stops the sound respectably using conditionals. The sound plays at a ScriptArea at the end of the corridor.