llLoopSound
void llLoopSound(string Sound, float Volume)Plays specified Sound, looping indefinitely, at Volume (0.0 - 1.0).
Only one sound may be attached to an object at a time.
A second call to llLoopSound with the same key will not restart the sound, but the new volume will be used. This allows control over the volume of already playing sounds.
Setting the volume to 0 is not the same as calling llStopSound; a sound with 0 volume will continue to loop.
To restart the sound from the beginning, call llStopSound before calling llLoopSound again.
Parameters
-
Sound(string) -
Volume(float)
llLoopSound("ambient.wav", 0.5);Caveats
Section titled “Caveats”- A call to
llLoopSoundreplaces any other sound, so only one sound can be played at the same time from the same prim. Exception: sounds started with the deprecatedllSoundwhich always plays sound files to the end. An object can play 2 sounds withllLoopSoundif the function is called from different prims. - If a second call to loop the same sound at a different volume is made from within the same script, no volume change is made. Call
llStopSoundjust before the second call to enable a volume change with no discernible pause. - When called from a HUD attachment, the sound is only heard by the agent the task is attached to.