LSL Wiki Mirror 10-5-2006: llPreloadSound

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings ::
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.

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.
    }
}


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