Sound answer.  Plays a sound file on touch.  Runs thru the sequence of sound files in contents, following the order in the content list.   To change the order, put numbers or letters in front of name. 

To return to the top of the list, edit this function and select  Reset

integer CrSound=1;
integer TotSound;
Global variables
default {
state_entry()
{TotSound=llGetInventoryNumber(INVENTORY_SOUND);

CrSound=-1

 

touch_start(integer total_num)

 

{if(0 < TotSound)

 

{if(CrSound < TotSound - 1)
{ CrSound++; }

 
else
 
{ CrSound=0;
TotSound=llGetInventoryNumber(INVENTORY_TEXTURE);}
 
llPlaySound(llGetInventoryName(INVENTORY_SOUND, CrSound), 1);}

}

 
The Thinkerer 05/09/2008
Copyright (c) D. F. Dansereau & S. H. Evans

Site Map

Where start?

LODScr
Famous fables