--By Roandoom function sounddistance_init(e) Disatance1 = 600 -- put the distance when the sound should start here SoundStart = 0 end function sounddistance_main(e) Dist = GetPlayerDistance(e) SoundStart = Disatance1/100 if Dist < Disatance1 then Vol = (Dist/SoundStart) LoopSound(e,0) SetSoundVolume(125-Vol) end ActivateIfUsed(e) end