Pamela Galli Posted February 14, 2016 Share Posted February 14, 2016 I have this sound script and I want to turn down the volume. I changed the last number to 0.01 from 1 but that did not seem to do anything. default{state_entry(){llLoopSound(llGetInventoryName(INVENTORY_SOUND, 0), 0.01);}} Link to comment Share on other sites More sharing options...
steph Arnott Posted February 14, 2016 Share Posted February 14, 2016 Just write it as llLoopSound("what the sound is called", 0.5); First is a string, second the volume. All strings have to be between quote marks. The function inserted messes up things. llLoopSound("big bang", 0.5); ADDED, i used a comma in the float by mistake so edited it. Or could write it this way if you want too. string this_sound = llGetInventoryName(INVENTORY_SOUND, 0);llLoopSound(this_sound,0.5); Link to comment Share on other sites More sharing options...
arton Rotaru Posted February 14, 2016 Share Posted February 14, 2016 Put a llStopSound(); before the llLoopSound() function. default{state_entry(){llStopSound();llLoopSound(llGetInventoryName(INVENTORY_SOUND, 0), 0.01);}} 0.01 will be very quite though. :matte-motes-zipped: Alternatively you can look into llAdjustSoundVolume(); Link to comment Share on other sites More sharing options...
steph Arnott Posted February 14, 2016 Share Posted February 14, 2016 still should make no diif as the script would be reset on save, it where that llGetInventryName function is. Link to comment Share on other sites More sharing options...
arton Rotaru Posted February 14, 2016 Share Posted February 14, 2016 Nope. Please lookup llLoopSound() on the wiki. Link to comment Share on other sites More sharing options...
Pamela Galli Posted February 14, 2016 Author Share Posted February 14, 2016 Thanks to you both. It works fine as it is, I just did not know if that last number was for volume or not (all scripts are like hieroglyphics to me). I just could not detect any change in volume from 1 to 0.01. I did look at the Wiki but it did not tell me what the numbers meant. Link to comment Share on other sites More sharing options...
arton Rotaru Posted February 14, 2016 Share Posted February 14, 2016 The script and your edit is fine. It's just that without stopping the loop sound, before making another call with the same sound won't change the volume. So stopping the sound beforehand does the trick. Link to comment Share on other sites More sharing options...
steph Arnott Posted February 14, 2016 Share Posted February 14, 2016 Stil can not work out why you think llStopSound is needed, would if the sound switch to another sound file or turned off. As soon as the script is saved the float is changed to the new setting. Link to comment Share on other sites More sharing options...
arton Rotaru Posted February 14, 2016 Share Posted February 14, 2016 The script is saved, the float is changed, but the sound is still running at it's initial volume. Just give it a try in-world if you don't believe it. :matte-motes-smile: Link to comment Share on other sites More sharing options...
steph Arnott Posted February 14, 2016 Share Posted February 14, 2016 Yes you are correct. ADDED; Which it would be becouse it is client side, Link to comment Share on other sites More sharing options...
Pamela Galli Posted February 14, 2016 Author Share Posted February 14, 2016 Ah okay, thanks,I will use that script with the stop sound -- I am assuming it will still loop. Link to comment Share on other sites More sharing options...
steph Arnott Posted February 14, 2016 Share Posted February 14, 2016 Yes and resend the new volume float to the veiwer. ADDED, It will just change the volume. Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now