llAdjustSoundVolume(float volume)
Change the volume of the sound of the prim the script is in when it is already playing.
Sleeps the script for 0.1 seconds.
A float value indicating the new volume to set, between 0.0 and 1.0.
llPlaySound
, llLoopSound
, and similar. Does not work for llTriggerSound
or llTriggerSoundLimited
.llAdjustSoundVolume(0.2); // Sets the volume of a playing sound to 20% of the max.
The following script will start a looped sound in the prim, then lower its volume every time it's clicked. When it gets to zero, it wraps around to maximum volume.
float vol = 1; default { state_entry() { // Start the Jetpack looped sound llLoopSound("67f5e4f0-0534-4d97-bc01-f297648d20e0", vol); } touch_start(integer n) { // Lower the volume of the sound, or go to full volume if already zero vol -= 0.125; if (vol < 0) vol = 1; llAdjustSoundVolume(vol); } }
llStopSound
stops a sound playing in this prim.llPlaySound
plays a sound in this prim.llLoopSound
plays a looped sound in this prim.llLoopSoundMaster
plays a looped sound letting others synchronize with it.llLoopSoundSlave
plays a looped sound synchronized with a master.llPlaySoundSlave
plays a sound synchronized with a master.llSetSoundRadius
adjusts how far the prim sounds can be heard.llSetSoundQueueing
adjusts whether sounds are enqueued in this prim.llTriggerSound
"drops" a sound where the prim is.llTriggerSoundLimited
"drops" a sound where the prim is, with limited reach.llPreloadSound
causes a sound to be preloaded, for faster playing.llSound
plays a sound in this prim (deprecated - use llPlaySound
instead).llSoundPreload
causes a sound to be preloaded (deprecated - use llPreloadSound
instead).