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

LSL Wiki : llPreloadSound

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are crawl338.us.archive.org
llPreloadSound(string sound)

Preloads the sound clip defined by sound. If sound is in the task's inventory, then sound can be the name of the sound clip. If not, sound must be the key of the sound clip.

This function delays the script 1 second.

Note:There's still a bug that, when llPreloadSound is used in connection with llPlaySound, will cause the latter to loop the sound in some circumstances. -CorbenRadium 06/06/2010

Example:
default
{
    state_entry()
    {
        // preload "mysound" for anyone that is currently in listening range of this object.
        llPreloadSound("mysound");
    }
    
    touch_start(integer num_detected)
    {
        llPlaySound("mysound", 1.0); // play "mysound" when touched.
    }
}


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

Functions | Sound
There are 8 comments on this page. [Display comments/form]