Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Advice on stopping a looped sound script ?

SirSticky Hornpipe
Registered User
Join date: 24 Jun 2005
Posts: 43
10-24-2009 17:06
I am using s standard looping sound script, but i woulds like it to stop after a set time of 60 seconds, could you please advise how i would go about doing that.
This is the script i have:

default
{

touch_start(integer total_number) {

llLoopSound(llGetInventoryName(INVENTORY_SOUND,0),1);

}

}

thanks in advance.
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
10-24-2009 17:19
CODE

default
{

touch_start(integer total_number) {
llSetTimerEvent(60);
llLoopSound(llGetInventoryName(INVENTORY_SOUND,0),1);

}

timer()
{
llStopSound();
llSetTimerEvent(0);
}
}
_____________________
It's hard to tell gender from names around here but if you care, Rolig = she. And I exist only in SL, so don't ask.... ;)

Look for my work in XStreetSL at
SirSticky Hornpipe
Registered User
Join date: 24 Jun 2005
Posts: 43
thankies
10-24-2009 17:23
Thankyou Rolig, works a treat.