GetSoundPan

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

This function is used to get the pan level of the specified sound element.

Syntax

float getSoundPan ( element theSound )

OOP Syntax Help! I don't understand this!

Method: sound:getPan(...)
Variable: .pan
Counterpart: setSoundPan


Required Arguments

  • theSound: the sound element which pan you want to get.

Returns

Returns float value with range from -1.0 (left) to 1.0 (right), false otherwise.

Example

Click to collapse [-]
Client
function playMusic()
    local song = playSound("song.mp3")
    setSoundPan(song, -1)
    outputChatBox("Current pan is " .. getSoundPan(song))
end
addCommandHandler("music", playMusic)

See Also