Don't click here unless you want to be banned.

LSL Wiki : llLoopSound

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are crawl814.us.archive.org
llLoopSound(string sound, float volume)

Loops sound indefinitely. sound is a UUID of a sound file, or the name of a sound file if the sound file is in task's inventory. volume is a float between 0 and 1 which defines the volume to play the sound at. If volume is > 1, it is set to 1.

llLoopSound can be stopped using llStopSound(). The volume of sounds started with llLoopSound or llPlaySound can be adjusted using llAdjustSoundVolume.



example script

//By James Benedek
//loop sound state on and off

default
{
        touch_start(integer num_detected)
        {
         llLoopSound("",1);//Put the sound file's name thats inside the object or the UUID in between the ""
         state loop;
        }
}
state loop
{
        touch_start(integer num_detected)
        {
         llStopSound();//this will stop the loop sound
         state default;
        }
}


Compare with llLoopSoundSlave.


This article wasn't helpful for you? Maybe the related article at the LSL Portal is able to bring enlightenment.

Functions | Sound
Comments [Hide comments/form]
Looped sounds appear to be an attribute of the object, like texture animations. That means that if you stop the script, or even delete it, the soudn loop keeps going until you call llStopSound().
-- LexNevaForgotHerPassword (2006-05-30 14:11:10)