You are currently not logged in! Enter your authentication credentials below to log in. You need to have cookies enabled to log in.
This shows you the differences between two versions of the page.
functions:llstopsound [2014-12-09 06:52 SLT] sei Typo; add links |
functions:llstopsound [2015-02-04 18:18 SLT] (current) sei style |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | $nav | ||
===== Function: llStopSound ===== | ===== Function: llStopSound ===== | ||
Line 5: | Line 6: | ||
</code> | </code> | ||
- | Stops the sound playing in the prim the script is running in. | + | Stops the $lart[sound] playing in the prim the script is running in. |
===== Notes ===== | ===== Notes ===== | ||
- | * Works only for [[llPlaySound]], [[llLoopSound]], and similar. Does not work for [[llTriggerSound]] or [[llTriggerSoundLimited]]. | + | * Works only for $lfn[llPlaySound], $lfn[llLoopSound], and similar. Does not work for $lfn[llTriggerSound] or $lfn[llTriggerSoundLimited]. |
===== Short examples ===== | ===== Short examples ===== | ||
Line 19: | Line 20: | ||
===== Complete examples ===== | ===== Complete examples ===== | ||
- | This script will start a looped sound when it is touched, and stop it when it is touched again. | + | This script will start a looped $lart[sound] when it is touched, and stop it when it is touched again. |
<file lsl2 llStopSound-example.lsl> | <file lsl2 llStopSound-example.lsl> | ||
Line 30: | Line 31: | ||
sound = !sound; | sound = !sound; | ||
if (sound) | if (sound) | ||
- | // Start the Jetpack looped sound | + | // Start the Jetpack looped sound at full volume. |
- | llLoopSound("67f5e4f0-0534-4d97-bc01-f297648d20e0", vol); | + | llLoopSound("67f5e4f0-0534-4d97-bc01-f297648d20e0", 1.0); |
else | else | ||
// Stop it | // Stop it | ||
Line 41: | Line 42: | ||
===== See also ===== | ===== See also ===== | ||
- | * [[llPlaySound]] plays a sound in this prim. | + | * $lfn[llPlaySound] plays a sound in this prim. |
- | * [[llLoopSound]] plays a looped sound in this prim. | + | * $lfn[llLoopSound] plays a looped sound in this prim. |
- | * [[llLoopSoundMaster]] plays a looped sound letting others synchronize with it. | + | * $lfn[llLoopSoundMaster] plays a looped sound letting others synchronize with it. |
- | * [[llLoopSoundSlave]] plays a looped sound synchronized with a master. | + | * $lfn[llLoopSoundSlave] plays a looped sound synchronized with a master. |
- | * [[llPlaySoundSlave]] plays a sound synchronized with a master. | + | * $lfn[llPlaySoundSlave] plays a sound synchronized with a master. |
- | * [[llAdjustSoundVolume]] adjusts the volume of a sound playing in this prim. | + | * $lfn[llAdjustSoundVolume] adjusts the volume of a sound playing in this prim. |
- | * <wrap important>[[llSetSoundRadius]]</wrap> adjusts how far the prim sounds can be heard. | + | * <wrap important>$lfn[llSetSoundRadius]</wrap> adjusts how far the prim sounds can be heard. |
- | * [[llSetSoundQueueing]] adjusts whether sounds are enqueued in this prim. | + | * $lfn[llSetSoundQueueing] adjusts whether sounds are enqueued in this prim. |
- | * [[llTriggerSound]] "drops" a sound where the prim is. | + | * $lfn[llTriggerSound] "drops" a sound where the prim is. |
- | * [[llTriggerSoundLimited]] "drops" a sound where the prim is, with limited reach. | + | * $lfn[llTriggerSoundLimited] "drops" a sound where the prim is, with limited reach. |
- | * [[llPreloadSound]] causes a sound to be preloaded, for faster playing. | + | * $lfn[llPreloadSound] causes a sound to be preloaded, for faster playing. |
+ | * <wrap important>$lfn[llSound]</wrap> plays a sound in this prim (deprecated - use $lfn[llPlaySound] instead). | ||
+ | * <wrap important>$lfn[llSoundPreload]</wrap> causes a sound to be preloaded (deprecated - use $lfn[llPreloadSound] instead). | ||
+ | * $lart[Sound] (general information) |