setSoundMinDistance
Client-side
Server-side
Shared
Pair: getSoundMinDistance
Sets a custom sound minimum distance at which the sound stops getting louder.
OOP Syntax Help! I don't understand this!
- Method: sound:setMinDistance(...)
- Variable: .minDistance
Syntax
bool setSoundMinDistance ( sound theSound, int distance )
Required Arguments
- theSound: A sound element.
- distance: An integer representing the distance the sound stops getting louder. The default value for this is 5.
Returns
- bool: result
Returns a true if the minimum distance was set, false otherwise.
Code Examples
client
local sound = playSound3D("sounds/song.mp3", 373.14, -125.21, 1001, true)
function distanceFunc(command, param) setSoundMinDistance(sound, tonumber(param))endaddCommandHandler("setdistance", distanceFunc)
See Also
Audio Functions
- getRadioChannelName
- getRadioChannel
- getSoundBPM
- getSFXStatus
- getSoundBufferLength
- getSoundEffectParameters
- getSoundEffects
- getSoundFFTData
- getSoundLevelData
- getSoundLength
- getSoundMetaTags
- getSoundMaxDistance
- getSoundMinDistance
- getSoundPan
- getSoundPosition
- getSoundProperties
- getSoundSpeed
- getSoundVolume
- getSoundWaveData
- isSoundLooped
- isSoundPanningEnabled
- isSoundPaused
- playSFX
- playSFX3D
- playSound
- playSound3D
- setRadioChannel
- setSoundEffectEnabled
- setSoundEffectParameter
- setSoundMaxDistance
- setSoundLooped
- setSoundMinDistance
- setSoundPan
- setSoundPanningEnabled
- setSoundPaused
- setSoundPosition
- setSoundProperties
- setSoundSpeed
- setSoundVolume
- stopSound