Jym_Nova icon

CD 9sec Clips

Jym_Nova | PRO | 07/18/15 12:11:58 AM UTC | 0 ⭐ | 858 👁️ | Never ⏰ | []
Linden Scripting |

0 B

|

None

|

0 👍

/

0 👎

// 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 <http://www.gnu.org/licenses/>.
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();
        }
    }
}

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎