M MY Multiplayer: Wiki
Side
Kind

getSoundVolume

Shared

Returns a sound's volume, not counting how it falls with distance.

float|false getSoundVolume(sound sound)

Parameters

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

Returns

The volume (1 is normal), or false if the sound was not found.

Example

setSoundVolume(music, getSoundVolume(music) * 0.5)

See also