EmitSound
This function plays a sound at an entity's position in 3D space. Spatialized sounds must be in mono format.
Syntax
- void EmitSound(Sound* sound, float range=50, float volume=1, float pitch=1, bool loopmode=false)
- void 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.