Adjusts the audible distance of a sound source.
The volume the sound can be heard at, after executing this command, depends on the recorded loudness of the sound, as well as the environment and other ambient sounds. For instance, if distance is set to 100, it does not mean that the sound is heard 100 meters away. For quieter sounds, it may have to be set to 500 or even more, in order to be heard.
|Syntax:||source setSoundSourceDistance distance|
_sound = createSoundSource ["Alarm", player modelToWorld [0,100,0], , 0]; // create a sound source _sound setSoundSourceDistance 500; // set its distance to 500
Demo mission to show the effect of this command on different sound sources: soundDistance.zip
|See also:||createSoundSource, getSoundSourceDistance|