setSoundPan
Client-side
 Server-side
 Shared
 Pair: getSoundPan
This function is used to change the pan level of the specified sound element.
OOP Syntax Help! I don't understand this!
- Method: sound:setPan(...)
- Variable: .pan
Syntax
bool setSoundPan ( sound/player theSound, float pan )Required Arguments
- theSound: The sound element which pan you want to modify.
- pan: A floating point number representing the desired pan level. Range is from -1.0 (left) to 1.0 (right).
Returns
- bool: result
Returns true if the sound element pan was successfully changed, false otherwise.
Code Examples
 client   
 function playMusic ()        local left = playSFX("genrl", 75, 6, true)    -- Play loading theme music        local right = playSFX("genrl", 75, 7, true)        setSoundPan(left, -1)                         -- switch the first music to left channel        setSoundPan(right, 1)                         -- switch the second music to right channelendaddCommandHandler("music", playMusic)                 -- add the command handlerSee Also
Audio Functions
- getSFXStatus
- getRadioChannel
- getSoundBPM
- getSoundBufferLength
- getRadioChannelName
- getSoundEffectParameters
- getSoundFFTData
- getSoundEffects
- getSoundLevelData
- getSoundMetaTags
- getSoundPan
- getSoundMinDistance
- getSoundMaxDistance
- getSoundPosition
- getSoundLength
- getSoundProperties
- getSoundVolume
- getSoundSpeed
- getSoundWaveData
- isSoundPanningEnabled
- playSFX3D
- isSoundPaused
- playSFX
- isSoundLooped
- playSound
- playSound3D
- setRadioChannel
- setSoundEffectEnabled
- setSoundLooped
- setSoundMaxDistance
- setSoundEffectParameter
- setSoundPan
- setSoundMinDistance
- setSoundPanningEnabled
- setSoundPaused
- setSoundPosition
- setSoundProperties
- setSoundSpeed
- setSoundVolume
- stopSound
 
 