Skip to content

llSetSoundRadius

void llSetSoundRadius(float Radius)

Limits radius for audibility of scripted sounds (both attached and triggered) to distance Radius.

Parameters
Radius (float)
Maximum distance that sounds can be heard.

Enable sound cutoff at 4 meters:

llSetSoundRadius(4);

Disable sound cutoff:

llSetSoundRadius(0);
  • This function is a prim property and will survive script resets.
  • Has no effect on llTriggerSound or llLinkPlaySound in triggered mode. Sounds will play regardless of camera position.
    • llTriggerSoundLimited can be used instead for a similar effect, but the function depends on avatar position, not camera position.
  • When used with llPlaySound or llLinkPlaySound in non-looped mode, the sound will be played from the beginning only once when the observer’s camera enters the radius for the first time. This can happen significantly later than when the one-off sound was actually played.
  • With llLoopSound or llLinkPlaySound in looped mode, the sound will be played from the beginning every time the observer’s camera enters the radius.
  • Volume fading is still determined by the distance from camera, not the radius.
  • Pass 0 to this function to disable it.