Don't click here unless you want to be banned.

LSL Wiki : llTriggerSound

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are crawl427.us.archive.org
llTriggerSound(string sound, float volume)

Triggers sound at task's current position. This sound eminates from that position no matter if task moves. sound can be either a sound file UUID (key) or the name of a sound file if it's in task's inventory. This function is not affected by llStopSound. volume specifies the volume to play the sound clip at, a value between 0 and 1. If volume is > 1, it is set to 1.

Land parcels can be set to block sound from entering or leaving the parcel.

Compare with llPlaySound.

Note: A call to llTriggerSound() where the sound to be played is unavailable (ie. referenced by name but is not present in the object's inventory, or by a non-valid key) will delay the calling script by one (1.0) second. - Cross Lament 01/19/2007
Use llGetInventoryType to check existence if it is not a key - BW

TriggerSound(string sound, float volume)
{//not fool proof but pretty reasonable.
    if((key)name);
    else if(llGetInventoryType(sound) == INVENTORY_SOUND);
    else
        return;
    llTriggerSound(sound, volume);
}//Written by Strife Onizuka


This article wasn't helpful for you? Maybe the related article at the LSL Portal is able to bring enlightenment.

Functions | Sound
Comments [Hide comments/form]
llTriggerSound (and llTriggerSoundLimited) does not work at or above 1024m Z elevation. Sounds will simply not be heard. (Most recently tested on June 25, 2006, under ver. 1.10.4.) Keep this in mind when designing vehicles and attachments (such as flight boost devices). llPlaySound, llPlaySoundLoop, etc. appear to work normally at these elevations, save for some distortion effects at extreme (thousands of kilometers) altitudes.
-- MoriashMoreau (2006-06-28 14:37:52)