Table of Contents

Start Functions Events Constants Types Language Articles

Function: llPlaySound

llPlaySound(string sound, float volume)

Play a sound once in the current prim.

Parameters

sound

A string with the sound name, or a UUID. If it is a sound name, it must exist in the inventory of the prim.

volume

The volume from 0.0 (minimum) to 1.0 (max)

Notes

Short examples

// Looks for a sound named "Applause" in the prim's inventor
y,
// playing it at full volume if it exists, or giving an error if not:
llPlaySound("Applause", 1.0);

// Plays a gunshot sound (unless a sound called 00000000-00 ... 0101
// already exists in the prim's inventory, in which case that sound
// will be played instead). The volume will be half the maximum.
llPlaySound("00000000-0000-0000-0000-000000000101", 0.5);

See also