OsSetSoundRadius
From OpenSimulator
(Difference between revisions)
m (Fixed some punctuation.) |
(Add exemple) |
||
Line 5: | Line 5: | ||
|delay=0 | |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. | |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; | ||
+ | |||
+ | 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.'' | |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 | This function was added in 0.9.0.1 | ||
}} | }} |
Revision as of 14:31, 27 November 2020
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 |