3run i think you not understand me, code you gave me is really simple but this is not what i need. Just imagine that we have a river in level and when the player gets closer to the river, volume begin increases, but only for the value of what a player is away from the river. The same thing happens when we turn away from the river. I was trying to find the right formula something like 100 - distance_player_of river = river_current_sound, and later this current sound i need to change in game/volume options.
I don't know how other peoples solve this problem, i know there are a wed sounds, but i think this can't help?