getSoundMinDistance
Client-side
Server-side
Shared
Pair: setSoundMinDistance
Gets a custom sound minimum distance at which the sound stops getting louder.
OOP Syntax Help! I don't understand this!
- Method: sound:getMinDistance(...)
- Variable: .minDistance
Syntax
int|false getSoundMinDistance ( sound theSound )
Required Arguments
- theSound: A sound element.
Returns
- int|false: min-distance
Returns an integer of the minimum distance, false if invalid arguements where passed.
Code Examples
client
local sound = playSound3D("sounds/song.mp3", 373.14, -125.21, 1001, true)
function distanceFunc() outputChatBox("Minimum distance: " .. getSoundMinDistance(sound))endaddCommandHandler("getdistance", distanceFunc)
See Also
Audio Functions
- getRadioChannel
- getRadioChannelName
- getSFXStatus
- getSoundBPM
- getSoundBufferLength
- getSoundEffectParameters
- getSoundFFTData
- getSoundEffects
- getSoundLength
- getSoundMaxDistance
- getSoundLevelData
- getSoundMetaTags
- getSoundMinDistance
- getSoundPan
- getSoundPosition
- getSoundSpeed
- getSoundWaveData
- getSoundVolume
- isSoundPaused
- isSoundPanningEnabled
- playSFX
- isSoundLooped
- getSoundProperties
- playSound
- playSFX3D
- setRadioChannel
- playSound3D
- setSoundEffectParameter
- setSoundEffectEnabled
- setSoundLooped
- setSoundMaxDistance
- setSoundMinDistance
- setSoundPan
- setSoundPaused
- setSoundPanningEnabled
- setSoundSpeed
- setSoundPosition
- setSoundProperties
- setSoundVolume
- stopSound