LlSetSoundQueueing: Difference between revisions

From Second Life Wiki
Jump to navigation Jump to search
Strife Onizuka (talk | contribs)
The next question, if you strip all scripts from the prim and then add a new script, does sound queuing survive? Does it survive take and rez?
Strife Onizuka (talk | contribs)
No edit summary
Line 1: Line 1:
{{LSL_Function/boolean|queue|fd=disables (default)|bool=*}}
{{LSL_Function/boolean|queue|pd=sound queuing:|fd=disables (default)|bool=*}}
{{LSL_Function
{{LSL_Function
|func_id=208|func_sleep=0.0|func_energy=10.0
|func_id=208|func_sleep=0.0|func_energy=10.0
Line 10: Line 10:
|caveats=
|caveats=
*It appears that only two sounds can be queued at a time.
*It appears that only two sounds can be queued at a time.
*Sound queuing is a property of the prim, not the script. It can be activated and deactivated by any script in the prim.
*Sound queuing is a property of the prim, not the script. It can be activated and deactivated by any script in the prim and survives script reset, rerez and script removal.
|constants
|constants
|examples=
|examples=
Line 17: Line 17:
{
{
     state_entry()
     state_entry()
     {      
     {
         llPreloadSound("SoundName1 as a string if sound is in prim inventory or UUID of sound");
         llPreloadSound("SoundName1");//This loads the sounds into all in range viewers and cuts delay between sounds.
        llPreloadSound("SoundName2");//This loads the sounds into all in range viewers and cuts delay between sounds.      
        llPreloadSound("SoundName2");//llPreloadSound parameter can be the name of a sound in the prim's inventory or a UUID of a sound");
     }
     }
     touch_start(integer detected)
     touch_start(integer detected)

Revision as of 20:39, 15 May 2009

Summary

Function: llSetSoundQueueing( integer queue );
0.0 Forced Delay
10.0 Energy

Set whether attached sounds wait for the current sound to finish. If queue is TRUE, queuing is enabled, if FALSE queuing is disabled. Sound queuing is disabled by default.

• integer queue boolean, sound queuing: TRUE enables, FALSE disables (default)

Caveats

  • It appears that only two sounds can be queued at a time.
  • Sound queuing is a property of the prim, not the script. It can be activated and deactivated by any script in the prim and survives script reset, rerez and script removal.

Examples

<lsl> default {

   state_entry()
   {
       llPreloadSound("SoundName1");//This loads the sounds into all in range viewers and cuts delay between sounds.
       llPreloadSound("SoundName2");//llPreloadSound parameter can be the name of a sound in the prim's inventory or a UUID of a sound");
   }
   touch_start(integer detected)
   {
       llSetSoundQueueing(TRUE);//Set to TRUE for queueing and SoundName2 plays after the SoundName1 has ended.
       //Set to FALSE only the second will be played since the prim has only one sound emmiter and the second was called last.
       //Can be set anywhere withing the script (if within an event it will activate when the event is triggered.
       llPlaySound("SoundName1", 1.0);
       llPlaySound("SoundName2", 1.0);
   }

}

</lsl>

See Also

Functions

•  llLoopSound
•  llLoopSoundSlave Plays a sound attached.

Deep Notes

Signature

function void llSetSoundQueueing( integer queue );