Table of Contents

Start Functions Events Constants Types Language Articles

Function: llStopSound

llStopSound()

Stops the sound playing in the prim the script is running in.

Notes

Short examples

llStopSound(); // stops a running sound

Complete examples

This script will start a looped sound when it is touched, and stop it when it is touched again.

llStopSound-example.lsl
integer sound;

default
{
    touch_start(integer n)
    {
        sound = !sound;
        if (sound)
            // Start the Jetpack looped sound at full volume.
            llLoopSound("67f5e4f0-0534-4d97-bc01-f297648d20e0", 1.0);
        else
            // Stop it
            llStopSound();
    }
}

See also