Sound
constSound:object
Defined in: server/api.d.ts:1742
Sounds in every player’s game at once, heard where each game places its listener.
Type Declaration
Section titled “Type Declaration”play()
Section titled “play()”play(
sound,at,options?):number
Plays a sound for every player near enough to hear it: the descriptor’s own attenuation decides how far it carries.
Parameters
Section titled “Parameters”string | number
A sound descriptor (SNDR) by form ID or editor ID.
string | number | Vector3 | Player | Npc
A spot, or a player, an NPC or a placed reference the sound follows as it moves.
options?
Section titled “options?”space: the spot’s worldspace or interior cell, the Commonwealth when left out. volume: 0 to 1, 1 by default.
space?
Section titled “space?”{ interiorCell?: number | string; worldSpace?: number | string; }
space.interiorCell?
Section titled “space.interiorCell?”number | string
space.worldSpace?
Section titled “space.worldSpace?”number | string
volume?
Section titled “volume?”number
Returns
Section titled “Returns”number
The sound’s number, for stop.
stop()
Section titled “stop()”stop(
sound):void
Stops a sound in every game still playing it.
Parameters
Section titled “Parameters”number
A number play gave.
Returns
Section titled “Returns”void