llLoopSound
function
Function syntax
llLoopSound(string sound,// Name of a sound in the prim's inventory, or a UUID.float volume// Volume level to set, between 0.0 (silent) and 1.0 (loud).
);- Energy
- 10
Plays the attached sound looping indefinitely at the specified volume. Only one sound can be attached to a prim at a time; new loops adjust the volume of the currently playing sound without restarting it.
Plays attached sound looping indefinitely at volume
llLoopSound("", 0.0);Caveats
Section titled “Caveats”- A call to
llLoopSoundreplaces any other sound (so that only one sound can be played at the same time from the same prim, except sounds started with the deprecated llSound which always plays sound files till 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.
llStopSoundset just previous to the second call for a new volume allows the volume change with no discernible pause.- When call made from HUD attachment sound is only heard by agent the task is attached to.
Examples
Section titled “Examples”Example 1
llLoopSound("ambient.wav", 0.5);History
Section titled “History”Added in SL 0.2.0
Known issues
Section titled “Known issues”From the issue templates included by the wiki article:
- SVC-4897 (nf): llSetSyncTime() - a function for synchronising client side effects
See also
Section titled “See also”Functions
Section titled “Functions”llLoopSoundMaster— 3=Plays a soundattachedindefinitely.llLoopSoundSlavellStopSound— 3=Stops playing a looped sound.llPlaySound— 3=Plays a soundattachedonce.llTriggerSound— 3=Plays a soundunattached.llTriggerSoundLimited
Original wiki source
Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.