// Written By: Ĵyм Ѡҩℓƒ (Jym Resident) /* LICENCE: This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . or you may visit - http://license.idjhost.com/ */ // DESCRIPTION // Play 9 second sounds back to back with preloaded sound for no interruption list invlist; integer tottrack; integer i; integer play = FALSE; sound() { llSetTimerEvent(9.0); tottrack = llGetInventoryNumber(INVENTORY_SOUND); float length = tottrack*9.0; llSay(0, (string)length); llPreloadSound(llGetInventoryName(INVENTORY_SOUND, 0)); i=0; } default { touch_start(integer total_number) { if (play) { sound(); } else { llSetTimerEvent(0.0); } play = !play; } timer() { llTriggerSound(llGetInventoryName(INVENTORY_SOUND, i), 100.0); i++; if(i+1 < tottrack ) { llPreloadSound(llGetInventoryName(INVENTORY_SOUND, i+1)); } if(i == tottrack ) { llResetScript(); } } }