EmitSound
This function plays a sound at an entity's position in 3D space. Spatialized sounds must be in mono format.
Syntax
- number EmitSound(Sound sound, number range=50, number volume=1, number pitch=1, bool loopmode=false)
- EmitSound(Source source)
Parameters
- sound: the new pick radius to set.
- range: the new pick radius to set.
- volume: the new pick radius to set.
- pitch: the new pick radius to set.
- loopmode: the new pick radius to set.
- source: the new pick radius to set.
Remarks
If loop mode is set to true, the sound will continue playing until the entity is deleted. If loop mode is set to false, the created source will be released when the sound finishes playing.
Only sounds in mono format can be played with 3D spatialization. Stereo sounds will not be affected by position.