Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Looping sound

Aylah Hope
Registered User
Join date: 6 Dec 2004
Posts: 133
02-15-2006 03:31
I need a simple script that loops one sound.
Any?

Thanks in advance.
Masakazu Kojima
ケロ
Join date: 23 Apr 2004
Posts: 232
02-15-2006 03:44
CODE
// Loop first sound in inventory

default {
state_entry() {
if ( llGetInventoryNumber(INVENTORY_SOUND) > 0 )
llLoopSound( llGetInventoryName(INVENTORY_SOUND, 0), 1.0 );
else
llStopSound();
}

changed(integer what) {
if ( what & CHANGED_INVENTORY )
llResetScript();
}
}


edit: what how did you post as a guest
Aylah Hope
Registered User
Join date: 6 Dec 2004
Posts: 133
02-15-2006 03:49
Heaven, that was a quick answer. Thanks a million:D