LlSetSoundRadius
Looking for the current API? Open the llLinkSetSoundRadius reference →
Overview
Establishes a hard cut-off radius for audibility for llPlaySound, llLoopSound and llLinkPlaySound in non-triggered mode. Sounds are not heard until an observer's camera enters the radius, and immediately stop when leaving the radius. Volume fading is still determined by the distance from camera, not the radius.
Function variants
llSetSoundRadius
llLinkSetSoundRadius
Caveats
- This function is a prim property, thus 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 a 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.
Examples
Enable sound cutoff at 4 meters.
llSetSoundRadius(4); //Enable sound cutoff at 4 meters.Disable sound cutoff.
llSetSoundRadius(0); //Disable sound cutoff.Notes
Pass 0 to this function to disable it.
See also: functions
History
Added in SL 0.4.0
Shared wiki helpers
The original page also injects shared parameter notes, caveats or issue information through these helpers. Their conditional MediaWiki logic is not reproduced here; inspect the preserved helper source for additional material.
Template:LSL Function/link-face
Original shared helper source (conditional wiki logic is not evaluated)
{{LSL Injection Test}}{{#if:{{{1|}}}|{{LSL Function/link|{{{1}}}|nogroup={{{nogroup|}}}}}}}{{#if:{{{2|}}}|{{LSL_Function/face|{{{2}}}}}}}{{#if:
{{#vardefine:also_functions|{{#var:also_functions}}
{{LSL DefineRow||[[llGetLinkNumberOfSides]]|Returns the number of faces of the linked prim.}}}}
}}Known issues
- SVC-3058: Function: llSetSoundRadius( float radius ); fails to limit sound to radius
Original wiki source
Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.