To preload the sounds just type /13 preload
CODE
// This script is meant to be worn as an attachment
// Either, insert all of the gesture sounds you use on a regular basis,
// then the script, and then Reset after inserting the script.
//*OR* Put the script in first and then the sounds, slowly so that it
// has time to execute build_list
// Scripted by: Jim Bunderfeld
// Released for the Second Life Community
// Use this script as you want OPEN SOURCE
// Thank you :-)
//
build_list(list sounds)
{
sounds = [];
integer num = llGetInventoryNumber(INVENTORY_SOUND);
integer i;
for(i = 0;i < num;i++)
{
sounds = sounds + [ llGetInventoryName(INVENTORY_SOUND,i)];
//llSay(0,llGetInventoryName(INVENTORY_SOUND,i));
}
}
list soundlist;
list keys;
default
{
state_entry()
{
build_list(soundlist);
llListen(13,"",llGetOwner(),"preload");
}
changed(integer change)
{
if(change == CHANGED_INVENTORY)
{
build_list(soundlist);
}
}
listen(integer c,string n,key i,string m)
{
integer listlength = llGetListLength(soundlist);
integer i;
for(i = 0;i <= listlength;i++)
{
string sound = llList2String(soundlist,i);
llPreloadSound(sound);
}
}
}