M MY Multiplayer: Wiki
Side
Kind

setSoundPan

Client

Moves a sound with no position towards the left or the right.

bool setSoundPan(sound sound, float pan)

Parameters

NameTypeDescription
soundsoundThe sound element, or a dui element for the browser's sound.
panfloatFrom -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)

See also