Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Sound script, order of sound loops?

Sabane Talamasca
Registered User
Join date: 25 Sep 2005
Posts: 56
11-05-2006 12:51
I'm looking for a script that will do this.


I'll be able to set names of loops in the script so, once i touch it, sound A starts, then sound B starts right after but stays on a loop until touched to turn off, Once turned off Sound C plays and then it ends..

I have a few sound loop scripts but they just play randomly or in order, i'd like to be able to set in the script which order they play and which ones loop once which ones loop over and over ect..

Is this easy to make?
Raeyan Aldrich
Registered User
Join date: 14 Oct 2006
Posts: 44
11-06-2006 19:39
getting them to link seamlessly would be all but impossible... you could however use something to the extent of:

CODE

integer inloop = FALSE;

default
{
state_entry()
{
llSetSoundQueueing(TRUE);
}

touch_start(integer total_number)
{
if(inloop)
{
llPlaySound("soundc in inventory", 1.0);
llStopSound();
inloop = FALSE;
} else {
llPlaySound("sounda name in inventory", 1.0);
llSleep(10.0); //each clip is limited to a max of 10 seconds, set this value = the length of your song in seconds, but trim off about 0.1 seconds to get it queued before the first sound stops
llLoopSound("soundb name in inventory", 1.0);
inloop = TRUE;
}
}
}
Sabane Talamasca
Registered User
Join date: 25 Sep 2005
Posts: 56
11-07-2006 19:23
Thanks works out how I was wanting, only small issues is when i click for off it won't play the closing sound right away rather keep playing out the rest of the last loop...but thats probably the way it works, other than that thx muchly :)
Sabane Talamasca
Registered User
Join date: 25 Sep 2005
Posts: 56
11-07-2006 19:25
say..i'm wondering, would it be tough to add say, an option to when you clicked this thing, a menu came up, and had different options to choose, and would animate your avy like to press a button, pull a lever ect? and or add an option to have it make a linked prim rotate or what have you. Please send me an i'm if you could set me up i'd pay you for your time.