You are currently not logged in! Enter your authentication credentials below to log in. You need to have cookies enabled to log in.
This is an old revision of the document!
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.
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); } }