setSoundPan
Client
Moves a sound with no position towards the left or the right.
bool setSoundPan(sound sound, float pan)
Parameters
| Name | Type | Description |
|---|---|---|
| sound | sound | The sound element, or a dui element for the browser's sound. |
| pan | float | From -1 (left only) to 1 (right only). 0 is the centre. |
Returns
true if it was applied, false if the sound is 3D or was not found.
Example
local beep = playSound("sounds/beep.wav")
setSoundPan(beep, -1)