Jump to content

Kenna UwU

Resident
  • Posts

    4
  • Joined

  • Last visited

Posts posted by Kenna UwU

  1. I've got another here as well that is completely fine when there's the initial UUID's, and when I remove about 5 of them it gives me a syntax error where there previously weren't any before. This is the script with the syntax errors - 

     

    list FRAGMENTS_DOOMER=[
        10.0,
        "0d44197a-f8d4-6860-b200-acf0785b17dd",
        "bf4b24dc-66a5-9f17-6d51-280b59f1e739",
        "acc764d2-f95a-0821-223d-eba8657c05c3",
        "cf374c5a-3ce7-ac5f-8de0-9bdcfdc5782f",
        "8ceb744c-47e2-c113-1153-0eb86082099e",
        "b1475ffe-177f-ab76-f0f8-95c540139123",
        "08988d9e-309c-0186-cb58-32d16af5e7e5",
        "2d89ba72-8c61-7ca9-a7b2-f2c3a9d054b8",
        "19fc4b80-cd5b-3ce8-2a0b-7280211adf67",
        "71a5c296-9966-a0b1-914f-847a0748c766",
        "920bbecb-80c0-013d-1c00-055497ca01d4",
        "6fd5f16b-4af3-9957-50a0-7cacc0b25ecf",
        "5969cf94-1ef5-e2c8-548b-56122b5bfe13",
        "3a594a68-ffed-1006-9af2-0d379cd41a3f", 
          };

    float VOLUME=1;
    integer PRELOAD_FACTOR=10;

    // Global Variables

    integer NEXT;
    integer INDEX; 
    integer COUNT;
    list FRAGMENTS;

    // Functions

    uInit(){
        llStopSound();


    uInitPlay(list F){
        FRAGMENTS=F;
        llStopSound();
        COUNT=llGetListLength(FRAGMENTS);
        float TIMER=llList2Float(FRAGMENTS,0);
        uTimer(TIMER);
        INDEX=0;
        uPlay();


    uPlay(){
        INDEX++;
        if(INDEX>=COUNT)INDEX=1;
        key FRAGMENT=llList2Key(FRAGMENTS,INDEX);
        llPlaySound(FRAGMENT,VOLUME);
        NEXT=INDEX+1;
        if(NEXT>=COUNT)NEXT=1;
        integer I;
        key NEXT_FRAGMENT=llList2Key(FRAGMENTS,NEXT);
        for(I=0;I<PRELOAD_FACTOR;I++){
            llTriggerSound(NEXT_FRAGMENT,.001);
            llSleep(.05);


    uTimer(float TIMER){
        llSetTimerEvent(TIMER);

    uTouch(){
        llTriggerSound("17ccd645-c279-08cf-9ce4-504b8897b7b2",.2);
        llSetTimerEvent(0);


    uR(){
        llOwnerSay("Click me to play.");
        llResetScript();
    }

    // Procedure

    default{
        state_entry(){
            uInit();
        }
        touch_end(integer T){
            uTouch();
            state doomer;
        }
        on_rez(integer P){
            uR();
        }
    }

    state doomer{
        state_entry(){
            uInitPlay(FRAGMENTS_DOOMER);
        }
        timer(){
            uPlay();
        }
        touch_end(integer P){
            uTouch();
            state default;
        }
        on_rez(integer P){
            uR();
        }
    }

  2. Hi there! I'm really confused and getting a syntax error on line 0 (integer clips;) and 22 (default) and don't know how to fix it. 

     

    It's for a multiple WAV music script, if anyone could help that would be fantastic! 

     

    integer clips; 
    integer toggle = TRUE;
    float clip_length = 9.5;//in seconds
    float last_clip_length = 5.5;//length of last clip in seconds
    integer cycle;

    init()
    {
        toggle = TRUE;
        llSetTimerEvent(0);
        llSetSoundQueueing(FALSE);
        llStopSound();
        {
        llTargetOmega(<0,0,0>,0.0,0);
         llOwnerSay("Loading Mojave Music Radio Station, please wait.");
        llSetSoundQueueing(TRUE);
        clips = llGetInventoryNumber(INVENTORY_SOUND);
        llPreloadSound(llGetInventoryName(INVENTORY_SOUND,0));
        llSleep(clip_length/2);
        llOwnerSay("Touch to start.");
    }

    default
    {
        state_entry()
        {
            init();
        }
        on_rez(integer param)
        {
            init();
        }

        touch_start(integer total_number)
        {
                
            if(llDetectedKey(0) == llGetOwner()){
                if(toggle){
                toggle = FALSE;
                llOwnerSay("Starting Player");
                llSetSoundQueueing(TRUE);
                
                llPlaySound(llGetInventoryName(INVENTORY_SOUND,0),1);
                llPreloadSound(llGetInventoryName(INVENTORY_SOUND,1));
                cycle = 1;
                }    
                
        }

                llPreloadSound(llGetInventoryName(INVENTORY_SOUND,1));
                cycle = 1;
                llSetTimerEvent(clip_length/2);
                }
                else { 
                toggle = TRUE;
                llSetTimerEvent(0);
                llOwnerSay("Player Stopped");
                llSetSoundQueueing(FALSE);
                llStopSound();
                }
            }
        }
        timer()
        {
                
                
                if(cycle < clips ){
                llPlaySound(llGetInventoryName(INVENTORY_SOUND,cycle),1);
                cycle = cycle + 1;
                    if(cycle < clips){
                    llSetTimerEvent(clip_length);
                    llPreloadSound(llGetInventoryName(INVENTORY_SOUND,cycle));
                    }
                    else {
                    llSetTimerEvent(last_clip_length);
                    llPreloadSound(llGetInventoryName(INVENTORY_SOUND,0));
                    }
                }
                else {
                llSetTimerEvent(clip_length);
                llPlaySound(llGetInventoryName(INVENTORY_SOUND,0),1);

×
×
  • Create New...