Sound
constSound:object
Defined in: client/api.d.ts:811
Game sounds only the local player hears, played through the game’s audio as Sound.Play does. A resource’s sounds stop when it stops.
Type Declaration
Section titled “Type Declaration”isPlaying()
Section titled “isPlaying()”isPlaying(
id):boolean
Whether a sound play started has yet to end; true while it is still starting.
Parameters
Section titled “Parameters”number
What play returned.
Returns
Section titled “Returns”boolean
play()
Section titled “play()”play(
sound,options?):number
Plays a sound for this client alone. The instance ID, or 0 when nothing played: no such sound, 64 already playing, or the game refused it.
Parameters
Section titled “Parameters”string | number
A sound descriptor (SNDR), or a sound marker (SOUN) for its descriptor: its editor ID, or its form ID (a number, or a string starting 0x).
options?
Section titled “options?”x, y, z: play at this world point, all three or none; without them the sound is unpositioned, heard the same wherever the camera is. volume: 0 to 1, 1 by default.
volume?
Section titled “volume?”number
number
number
number
Returns
Section titled “Returns”number
stop()
Section titled “stop()”stop(
id):boolean
Stops a sound play started. False when it already ended or was never played here.
Parameters
Section titled “Parameters”number
What play returned.
Returns
Section titled “Returns”boolean