Unofficial LSL Reference

[[functions:llplaysound]]


Unofficial LSL reference

User Tools

Login

You are currently not logged in! Enter your authentication credentials below to log in. You need to have cookies enabled to log in.

Login

Forgotten your password? Get a new one: Set new password

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

functions:llplaysound [2015-02-04 11:39 SLT]
sei missed one instance
functions:llplaysound [2015-06-28 11:12 SLT] (current)
sei remove plural
Line 6: Line 6:
 </​code>​ </​code>​
  
-Plays a $lart[sound] once in the current prim.+Play a $lart[sound] once in the current prim.
  
 ===== Parameters ===== ===== Parameters =====
Line 21: Line 21:
   * A prim can only have one sound at a time. If another sound starts playing, the currently playing sound or $lfn[llLoopSound|looped sound] will stop, unless $lfn[llSetSoundQueueing] is set to $ct[TRUE].   * A prim can only have one sound at a time. If another sound starts playing, the currently playing sound or $lfn[llLoopSound|looped sound] will stop, unless $lfn[llSetSoundQueueing] is set to $ct[TRUE].
     * Note that $lfn[llTriggerSound] and $lfn[llTriggerSoundLimited] start sounds that are not part of a prim, but are "​dropped"​ where the prim is at the time of starting and become independent,​ and are therefore not subject to this limitation.     * Note that $lfn[llTriggerSound] and $lfn[llTriggerSoundLimited] start sounds that are not part of a prim, but are "​dropped"​ where the prim is at the time of starting and become independent,​ and are therefore not subject to this limitation.
-  * If the prim belongs to a HUD, the sound started by $fn[llPlaySound] will be heard only by the wearer. To play sounds from a HUD that can be heard by people around, use $lfn[llTriggerSound] or $lfn[llTriggerSoundLimited].+  * If the prim belongs to a $lart[HUD], the sound started by $fn[llPlaySound] will be heard only by the wearer. To play sounds from a $art[HUDthat can be heard by people around, use $lfn[llTriggerSound] or $lfn[llTriggerSoundLimited].
   * If the sound is a $lart[UUID],​ it doesn'​t need to be present in the prim.   * If the sound is a $lart[UUID],​ it doesn'​t need to be present in the prim.
-  * If the name of a sound present in the prim's inventory matches the $art[UUID] of a sound different to it, the sound that will play is the one in the inventory, not the $art[UUID]. +  * If the name of a sound present in the prim's inventory matches the $art[UUID] of a different ​sound, the sound that will play is the one in the item, not the $art[UUID]. 
-  * If the name is not a $art[UUID], and it is not present in the prim's inventory, an error will be shouted ​in $lct[DEBUG_CHANNEL].+  * If the name is not a $art[UUID], and it is not present ​in the prim's inventory, or if an item with that name which is not a sound exists ​in the prim's inventory, an error will be privately said (20m range) to the owner in $lct[DEBUG_CHANNEL].
  
 ===== Short examples ===== ===== Short examples =====
Line 34: Line 34:
 llPlaySound("​Applause",​ 1.0); llPlaySound("​Applause",​ 1.0);
  
-// Plays a gunshot sound (unless a sound called 00000000-...0101+// Plays a gunshot sound (unless a sound called 00000000-00 ... 0101
 // already exists in the prim's inventory, in which case that sound // already exists in the prim's inventory, in which case that sound
 // will be played instead). The volume will be half the maximum. // will be played instead). The volume will be half the maximum.