OsSetSoundRadius
From OpenSimulator
(Difference between revisions)
BillBlight (Talk | contribs) |
|||
(7 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{osslfunc | {{osslfunc | ||
+ | |function_syntax=void osSetSoundRadius(integer linknum, float radius) | ||
+ | |threat_level=ignored | ||
+ | |permissions=true | ||
+ | |delay=0 | ||
+ | |description=Establishes a hard cut-off radius for audibility of scripted sounds (both attached and triggered) in the specified prim of a linkset. | ||
+ | |ossl_example=<source lang="lsl"> | ||
+ | // | ||
+ | // osSetSoundRadius Script Example | ||
+ | // | ||
− | + | string sound = "f4a0660f-5446-dea2-80b7-6482a082803c"; | |
+ | float radius = 5.0; | ||
− | osSetSoundRadius( | + | default |
+ | { | ||
+ | state_entry() | ||
+ | { | ||
+ | if (osIsUUID(sound)) | ||
+ | { | ||
+ | llSay(PUBLIC_CHANNEL, "Touch to hear osSetSoundRadius running in a radius of " + (string)radius + " meters."); | ||
+ | osSetSoundRadius(1, radius); | ||
+ | } | ||
+ | |||
+ | else | ||
+ | { | ||
+ | llSay(PUBLIC_CHANNEL, "Invalid uuid detected ..."); | ||
+ | } | ||
+ | } | ||
− | | | + | touch_start(integer number) |
− | + | { | |
+ | osTriggerSound(1, sound, 1.0); | ||
+ | } | ||
+ | } | ||
+ | </source> | ||
+ | |additional_info=''This function is not currently implemented in viewer code. It appears to have been active in a pre-release of the LL viewer and has been non-functional back as far as 2005.'' | ||
+ | This function was added in 0.9.0.1 | ||
}} | }} | ||
− | + | == See Also == | |
− | * | + | * [[osSetSoundRadius]] |
+ | * [[osAdjustSoundVolume]] |
Latest revision as of 05:10, 3 January 2021
void osSetSoundRadius(integer linknum, float radius)
| |
Establishes a hard cut-off radius for audibility of scripted sounds (both attached and triggered) in the specified prim of a linkset. | |
Threat Level | This function does not do a threat level check |
Permissions | Use of this function is always allowed by default |
Extra Delay | 0 seconds |
Example(s) | |
// // osSetSoundRadius Script Example // string sound = "f4a0660f-5446-dea2-80b7-6482a082803c"; float radius = 5.0; default { state_entry() { if (osIsUUID(sound)) { llSay(PUBLIC_CHANNEL, "Touch to hear osSetSoundRadius running in a radius of " + (string)radius + " meters."); osSetSoundRadius(1, radius); } else { llSay(PUBLIC_CHANNEL, "Invalid uuid detected ..."); } } touch_start(integer number) { osTriggerSound(1, sound, 1.0); } } | |
Notes | |
This function is not currently implemented in viewer code. It appears to have been active in a pre-release of the LL viewer and has been non-functional back as far as 2005.
This function was added in 0.9.0.1 |
[edit] See Also
- osSetSoundRadius
- osAdjustSoundVolume