M MY Multiplayer: Wiki
Side
Kind

getSoundMaxDistance

Shared

Returns the distance at which a 3D sound goes silent.

float|false getSoundMaxDistance(sound sound)

Parameters

NameTypeDescription
soundsoundThe sound element. On the client a dui element also works, for the browser's sound.

Returns

The distance in metres, or false if the sound was not found.

Example

outputDebugString("Heard up to " .. getSoundMaxDistance(siren) .. " m")

See also