Jump to content

Endija Sella

Resident
  • Posts

    20
  • Joined

  • Last visited

Posts posted by Endija Sella

  1. 19 minutes ago, Frionil Fang said:

    From what I see, in your initial example and your changed script the increment happens on the same level, getting the same result of skipping sound #0. To paraphrase to its minimum, your script kind of does this right now:

    timer() {
          if(out_of_bounds) {
            sound(); // resets everything
          }  else {
            llPlaySound(a_sound);
          }
          i_playcounter++; // counter is incremented every time, even after reset, so sound #0 never plays again
      }
    }

    What you want it do to is:

    timer() {
          if(out_of_bounds) {
            sound(); // resets everything
          }  else {
            llPlaySound(a_sound);
            i_playcounter++; // counter incremented only when a sound is actually played
          }
      }
    }

    Make better sense?

    OH MY GOD, I was over complicating this. That makes so much more sense, yes! 
    Apologies for being a complete numpty. ;D 

    This SOLVED it, THANK YOU! 😍

    • Like 2
    • Thanks 1
  2. 7 minutes ago, Frionil Fang said:

    You may have missed the last part of Fenix's post: "As for skipping playing the first sound on each successive iteration, that I think is happening because of where you increment i_playecounter. You have that statement at the very end of your timer, outside any checks, so it will happen each and every time the timer goes off - which I don't think is what you want. Instead, move it up one scope level into the end of the else part of the timer's first if/else statement. That way, you only increment the counter if you just played a sound."

    Basically where the increment is now, it skips the first (number 0) sound after the first loop since the counter is incremented on every loop -- when it reaches the end of the loop, it resets the counter to 0, but then increments it to 1 before actually playing anything.

    Move the increment to the same block as llPlaySound, right after it and it'll be able to hit #0.

    The script actually doesn't care about the names of the sounds at all, it goes strictly by their inventory position, so renaming them can only change their relative order.

    Ahh, now I'm confused. I moved the I_playcounter to where Fenix said, but you're saying to move it back, right after llPlaySound? 😧

    Like this? 


    // Set the variable loop = TRUE to loop after reaching the end, set it to FALSE to play once.

    integer loop = TRUE;                // set to TRUE to loop again and again
    integer waves_to_preload = 1;       // wave files to Preload ahead of the wav being played.
    float preload_load_time = 0.1;      // seconds pause between each preloaded wave file attempt b4 play comnences
    float timer_interval = 29.9;         // time interval between requesting server to play the next wave
    integer total_wave_files;           // number of wave files
    integer i_playcounter;              // used by timer() player
    string preloading_wave_name;        // the name of the wave file being preloaded
    string playing_wave_name;           // the name of the wave being played

    go(integer play) {

        if (play)
        {
            sound();

        } else {
                llSetTimerEvent(0.0);
            llStopSound();
        }
    }

    sound() {

        total_wave_files = llGetInventoryNumber(INVENTORY_SOUND);
        integer counter = 0;        //do full preload of sound
        llSetSoundQueueing(TRUE); // only works on llPlaySound not llTriggerSound, so we can queue these silently
        integer local_total_wave_files = total_wave_files  ;

        float length = total_wave_files * 30.0;
        for (counter = 0 ; counter < waves_to_preload ; counter++)  //preload X wave files b4 we play
        {
             preloading_wave_name = llGetInventoryName(INVENTORY_SOUND, counter);
            llPreloadSound(preloading_wave_name);
            llSleep(preload_load_time);

        }
        llSetTimerEvent(0.1);   // start playing
        i_playcounter=0;
        counter=0;
    }


    default
    {
        state_entry()

        {
            go(TRUE);
        }

        timer()
        {
            llSetTimerEvent(timer_interval);
            if( i_playcounter >= (total_wave_files ) )
            {
                if (!loop)
                {
                    llSetTimerEvent(0);
                }
                else
                {
                    sound();
                }

            }  else {
                    playing_wave_name = llGetInventoryName(INVENTORY_SOUND, i_playcounter);
                    
             
                llPlaySound(playing_wave_name, 0.1); 
                }
                if(i_playcounter + waves_to_preload < (total_wave_files ))
                {
                    preloading_wave_name = llGetInventoryName(INVENTORY_SOUND, i_playcounter + waves_to_preload);
                   
                    llPreloadSound(llGetInventoryName(INVENTORY_SOUND, i_playcounter + waves_to_preload));
                }
                llSetSoundRadius(1); //Enable sound cutoff
             
            
            i_playcounter++;     //increment for next wave file in sequence!
                
        } }
     

  3. 1 hour ago, Fenix Eldritch said:

    When debugging problems, one of the first things one does is to put additional llOwnerSay commands throughout the code to report the values of relevant variables. In this case, I wanted to report what the fetched sound name and i_playcounter were just before the code actually tries to play or preload a sound.

    As it turns out, the value of i_playcounter is going out of bounds: it increments to 6 when it should be staying within the range of 0 to 5. Your code gets the sound names by inventory index... so when you try to fetch an inventory item by the 6'th index, that won't exist. Change the two if statements in your timer event as instructed by the comments below

    if( i_playcounter > (total_wave_files ) )			//should be >=
    ...
    if(i_playcounter + waves_to_preload <= (total_wave_files ))	//should be <

    As for skipping playing the first sound on each successive iteration, that I think is happening because of where you increment i_playecounter. You have that statement at the very end of your timer, outside any checks, so it will happen each and every time the timer goes off - which I don't think is what you want. Instead, move it up one scope level into the end of the else part of the timer's first if/else statement. That way, you only increment the counter if you just played a sound.

    Amazing feeedback! Appreciate the thorough comments, wow. Never expected such in depth response.

    Could the first sound skip also be related to SL lag in any way? I managed to get one good loop and it never looped properly again. Even with adjustments it skips the first sound. Would it be worth naming the sounds 0-5 instead of 1-6?

    This is what I've done - 


    // Set the variable loop = TRUE to loop after reaching the end, set it to FALSE to play once.

    integer loop = TRUE;                // set to TRUE to loop again and again
    integer waves_to_preload = 1;       // wave files to Preload ahead of the wav being played.
    float preload_load_time = 0.1;      // seconds pause between each preloaded wave file attempt b4 play comnences
    float timer_interval = 29.9;         // time interval between requesting server to play the next wave
    integer total_wave_files;           // number of wave files
    integer i_playcounter;              // used by timer() player
    string preloading_wave_name;        // the name of the wave file being preloaded
    string playing_wave_name;           // the name of the wave being played

    go(integer play) {

        if (play)
        {
            sound();

        } else {
                llSetTimerEvent(0.0);
            llStopSound();
        }
    }

    sound() {

        total_wave_files = llGetInventoryNumber(INVENTORY_SOUND);
        integer counter = 0;        //do full preload of sound
        llSetSoundQueueing(TRUE); // only works on llPlaySound not llTriggerSound, so we can queue these silently
        integer local_total_wave_files = total_wave_files  ;

        float length = total_wave_files * 30.0;
        for (counter = 0 ; counter < waves_to_preload ; counter++)  //preload X wave files b4 we play
        {
             preloading_wave_name = llGetInventoryName(INVENTORY_SOUND, counter);
            llPreloadSound(preloading_wave_name);
            llSleep(preload_load_time);

        }
        llSetTimerEvent(0.1);   // start playing
        i_playcounter=0;
        counter=0;
    }


    default
    {
        state_entry()

        {
            go(TRUE);
        }

        timer()
        {
            llSetTimerEvent(timer_interval);
            if( i_playcounter >= (total_wave_files ) )
            {
                if (!loop)
                {
                    llSetTimerEvent(0);
                }
                else
                {
                    sound();
                }

            }  else {
                    playing_wave_name = llGetInventoryName(INVENTORY_SOUND, i_playcounter);
                    
                if(i_playcounter + waves_to_preload < (total_wave_files ))
                {
                    preloading_wave_name = llGetInventoryName(INVENTORY_SOUND, i_playcounter + waves_to_preload);
                   
                    llPreloadSound(llGetInventoryName(INVENTORY_SOUND, i_playcounter + waves_to_preload));
                }

                llPlaySound(playing_wave_name, 0.1);
                llSetSoundRadius(1); //Enable sound cutoff
             
            }
            i_playcounter++;     //increment for next wave file in sequence!
        } }
     

  4. I've frankensteined a sound looping script, that only activates if you are close. 

    I've named the sounds from 1-6 as I have 6 sound files to play a whole song, but it seems to skip the first sound every time it goes around a loop, please help! 😧
     


    // Set the variable loop = TRUE to loop after reaching the end, set it to FALSE to play once.

    integer loop = TRUE;                // set to TRUE to loop again and again
    integer waves_to_preload = 3;       // wave files to Preload ahead of the wav being played.
    float preload_load_time = 0.5;      // seconds pause between each preloaded wave file attempt b4 play comnences
    float timer_interval = 29.9;         // time interval between requesting server to play the next wave
    integer total_wave_files;           // number of wave files
    integer i_playcounter;              // used by timer() player
    string preloading_wave_name;        // the name of the wave file being preloaded
    string playing_wave_name;           // the name of the wave being played

    go(integer play) {

        if (play)
        {
            sound();

        } else {
                llSetTimerEvent(0.0);
            llStopSound();
        }
    }

    sound() {

        total_wave_files = llGetInventoryNumber(INVENTORY_SOUND);
        integer counter = 6;        //do full preload of sound
        llSetSoundQueueing(TRUE); // only works on llPlaySound not llTriggerSound, so we can queue these silently
        integer local_total_wave_files = total_wave_files  ;

        float length = total_wave_files * 30.0;
        for (counter = 0 ; counter < waves_to_preload ; counter++)  //preload X wave files b4 we play
        {
             preloading_wave_name = llGetInventoryName(INVENTORY_SOUND, counter);
            llPreloadSound(preloading_wave_name);
        //start play sound timer in 'timer_interval' seconds when we are less than 'timer_interval' seconds from
            
            // finishing preloading.
            llSleep(preload_load_time);

        }
        llSetTimerEvent(0.1);   // start playing
        i_playcounter=0;
        counter=0;
    }


    default
    {
        state_entry()

        {
            go(TRUE);
        }

        timer()
        {
            llSetTimerEvent(timer_interval);
            if( i_playcounter > (total_wave_files ) )
            {
                if (!loop)
                {
                    llSetTimerEvent(0);
                }
                else
                {
                    sound();
                }

            }  else {
                    playing_wave_name = llGetInventoryName(INVENTORY_SOUND, i_playcounter);
                

                llPlaySound(playing_wave_name, 0.1);
                llSetSoundRadius(1); //Enable sound cutoff
               
                if(i_playcounter + waves_to_preload <= (total_wave_files ))
                {
                    preloading_wave_name = llGetInventoryName(INVENTORY_SOUND, i_playcounter + waves_to_preload);
                   
                    llPreloadSound(llGetInventoryName(INVENTORY_SOUND, i_playcounter + waves_to_preload));
                }
            }
            i_playcounter++;     //increment for next wave file in sequence!
        } }
     

  5. Good day fellow Second life members,

    I've been googling for hours and hours on how to export your pose so that the location stays the same. 
    I'm having issues in creating a ground pose, when I lower my animation and upload it on SL, instead of being on the ground my avatar is floating mid air.
    I found this topic and tried it the way they explained, but it doesn't make any sense to me and it didn't resolve my issue, what he's saying is to create two frames and set the COG and Origin to 0, but once I do that, my avatar is just standing as normal - 

    I've been experimenting around for hours, making the COG and Origin match up and lowering them both.
    Locking the location and rotation,locrot, whole body lock etc of the animation and none of them seemed to work.

    I'd be forever greatful if anyone could explain on how you lower your avatar so that it sits on the ground.

    Thank you so much for your time,

    Endija

  6. Hi, Cursea!

    My advice for you is to just stop talking to this person, because a true friend wouldn't try to change you or harras you everyday in changing your clothes!

    If you like what you wear other opinions shouldn't matter! We're all unique and we shouldn't try to be someone we're not! :)

    And like you said Second life is YOUR imagination not theirs!

    Good luck!

     


  7. Frawnmust wrote:

    Alt will zoom in and out, Alt+Ctrl will circle around your object.. Alt+ctrl click your avatar until you're at the front and the release control so only alt is held and zoom in on the face. 

    Ctrl+Shift+S to take a snap shot and save to inventory or disk. Drag and drop the photo onto your profile or upload it on the website/profile **Only uploaded images may be used in postings**://secondlife.i.lithium.com/i/smilies/16x16_smiley-very-happy.gif" border="0" alt=":smileyvery-happy:" title="Smiley Very Happy" />

    Also don't forget that the upload/snapshot costs 10L$ !

     

     

     

     

     

  8. Have you tried looking on marketplace? You can find a lot of avatar,shapes,clothes, accessories etc!

    And there is no 'How to find the right parents' you will just have to go out and meet people, or maybe talk to your friends if they know any person that is looking for a baby and who is rp in bloodlines!

  9. So when I crashed and logged back on my attachments haven't saved properly, I still had some old and unmoded stuff on me, and somethings were missing when I went to reattach them nothing happened, no warning or errors no nothing. I tried changing outfits, I tried clearing cache, I tried changing outfits reloging and changing back, but still nothing happened, I tried using secondlifes default viewer, it said I had the items on, but on me, but they weren't.

     

    Does anyone else have this problem with attaching things? :/

  10. Weird, I tried all of the above and none of it helped. :/

    edit: I've deleted all the files from my pc...that I could find and restarted it.. shut it down;.blbalbalba stil lags. So I installed it on my usb and it works good. :/ How do I delete the setting file from my pc. So I don't have to use my usb to work with qavimator. D:?

    edit2: So when I closed it and opened it again it did the same... So I went into 'run' and typed 'regedit' searched for 'qavimator' and then deleted the setting file and it works good. I guess it will go back to laggy once I close and open it again. :/ So will need to delete the setting file all the time.

  11. I've been using Qavimator for quiet long now. But today when I opened it and clicked on a joint/body part it just freezes for like 5seconds and then goes back to normal until I try to move or interact with it any other way. I tried looking for an answer on google but couldn't find one. I did try to take the fog off..nothing. Still lagged. And I reinstalled it too. Still lagged. Can anyone help? :/ Or sugest another program that I can use to make sl poses?

×
×
  • Create New...