Skip to content
lsl.devlsl.devLSL Dev

llLoopSound

function
Function syntax
llLoopSound(
  1. string sound,// Name of a sound in the prim's inventory, or a UUID.
  2. 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

How to use
llLoopSound("", 0.0);
  • A call to llLoopSound replaces 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 with llLoopSound if 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.
  • llStopSound set 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.
Example 1
llLoopSound("ambient.wav", 0.5);

Added in SL 0.2.0

From the issue templates included by the wiki article:

  • SVC-4897 (nf): llSetSyncTime() - a function for synchronising client side effects
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.