play sound

 

 

Scripts name play sound   
Purpose play the sound of a file in inventory, UUID-based  
script lanugages used lsl  
important settings for region ./.  
test on standalone - trunk  6.3 SVN8786, XEngine  
source osgrid forum  

 

Need to upload a sound first, wich UUID goes to the "soundid".

 

// set to the UUID of the sound you would like to play
// obtain by right clicking the sound in your inventory
// and selecting Copy Asset UUID
key soundid = "5021d25c-6da7-4591-9a9a-66464c17e022";

// Volume of sound, acceptable values are 0.0 (sound off)
// through 1.0 (loudest)
float volume = 1.0;

default
{
state_entry()
{
llSay(0, "Script running");
}

touch_start(integer total_number)
{
llPlaySound(soundid, volume);
}

}