Jump to content

Leoplod

Resident
  • Posts

    4
  • Joined

  • Last visited

Posts posted by Leoplod

  1. 2 minutes ago, steph Arnott said:
    
     float min = 1;
    
    float max = 30;
    
    float vol = 0.5;
    
    // Sound to play.
    key sound = "Fountain";//this is a string
    
    default
    {
        state_entry()
        {
            llLoopSound(sound, vol);
            
        }        
    } 

    So your script here is not the one used inworld. Which does clear up the fact that there is nothing wrong with this.

    That is the script with which you couldn't control the volume - otherwise it workes, as long as you are happy with the preset volume

    Below is the modified script with the stop command that let's me control the volume and raise it to 1.0

    Thanks again

     

    float min = 1;


    float max = 30;


    float vol = 1.0;

    // Sound to play.
    string sound = "bcb6dd68-1d01-5a32-9036-612c797373f9";

    default
    {
        state_entry()
        {
              
            llStopSound();
            llLoopSound(sound, vol);
            

        }        
    }

     

  2. 16 minutes ago, Fenix Eldritch said:

    For a quick fix of stopping the currently playing sound and restarting it with a new volume, Placing llStopSound(); on the line before the llLoopSound command in your state_entry event should work.

    Make sure you don't forget to add a semicolon ( ; ) after the command - otherwise you'll get a syntax error.

    Thank you Fenix... I can now control the volume

    And thanks for reminding me about the semicolon, that's what had me beaten

    Thanks again to all for helping

  3. 2 hours ago, Qie Niangao said:

    What happens if you llStopSound() first, before starting to loop it again?

    Also, be sure the sound is loud enough when you play it directly from inventory. Imported sounds tend to sound quieter in-world than they seem in, say, Audacity.

    Thanks for the replies to all...

    where in the script do I insert "llStopSound()"?

    I don't have experience in scripting and get "syntax error" whatever I try

    (I changed key sound = "Fountain";  to  string sound = "Fountain"; )

     

    float min = 1;
    float max = 30;
    float vol = 0.5;

    // Sound to play.
    string sound = "Fountain";

    default
    {
        state_entry()
        {
              
           
            llLoopSound(sound, vol);
     

        }        
    }

     

     

     

  4. I have little scripting experience, so please bear with me - I also searced the forums for a couple hours, but without result

    I try to use a simple loop sound script, but it doesn't make any difference in sound volume whether I set "float vol" to 0.1 or 1.0

    Can someone please help me with this? I need to make the faint fountain sound louder - it makes no difference whether I have the sound in the prim with the script or use the UUID

    Thanks...

     

    float min = 1;

    float max = 30;

    float vol = 0.5;

    // Sound to play.
    key sound = "Fountain";

    default
    {
        state_entry()
        {
              
           
            llLoopSound(sound, vol);
            

        }        
    }

     

×
×
  • Create New...