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 a prim 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 lower the volume of the looping sound every time it's touched. When it gets to zero, it wraps around to maximum volume.
float vol = 1; default { state_entry() { llLoopSound("Crackling fire", vol); } touch_start(integer n) { // Lowers the volume of the sound, wrapping around to full volume vol -= 0.125; if (vol < 0) vol = 1; llAdjustSoundVolume(vol); } }