Preloads sound on viewers within range
void llPreloadSound( string sound );
Forced delay: 1.0 seconds. Energy: 10.0.
//Will preload a sound when rezzed, then play it when 'touched'.
string sound = "name or uuid";//sound in inventory or UUID of a sound.
default
{
on_rez(integer start_param)
{
llSetText("Preloading....",<1,0,0>,1);
llPreloadSound(sound);
llSetText("Touch To Play",<1,1,1>,1);
}
touch_start(integer num_detected)
{
llPlaySound(sound, 1.0);
}
}