llLinkAdjustSoundVolume
function
Function syntax
llLinkAdjustSoundVolume(integer link,// Link number (1 for root, >1 for children) or a LINK_* flag of the prim to adjust. Values: Linksfloat volume// Volume level to set, between 0.0 (silent) and 1.0 (loud).
);- Energy
- 10
Adjusts the volume of the currently playing sound attached to the linked prim link (has no effect on sounds started with llTriggerSound).
Adjusts volume of attached sound.
llLinkAdjustSoundVolume(0, 0.0);Caveats
Section titled “Caveats”Not work llTriggerSound and llCollisionSound
Examples
Section titled “Examples”Example 1
default{ state_entry() { llListen(42, "", llGetOwner(), ""); }
listen(integer chan, string name, key id, string msg) { float value = (float)msg; llAdjustSoundVolume(value); llOwnerSay("Volume set to: " + (string)value + " of 1.0"); }}Example 2
default{ collision_start(integer p) { llPlaySound("5df2e97f-d3ab-9a80-7063-69007470a182", 1.0); llAdjustSoundVolume(1.0); llSetTimerEvent(0.2); //In 0.2 seconds, will reduce the volume of the currently playing audio. } timer(){ llAdjustSoundVolume(0.1); llSetTimerEvent(0.0); }}History
Section titled “History”Added in SL 0.2.0
Related functions
Section titled “Related functions”The original wiki page documents these functions together with this one:
See also
Section titled “See also”Functions
Section titled “Functions”llLinkPlaySoundllLinkSetSoundQueueingllLinkSetSoundRadiusllLinkStopSoundllLoopSoundllLoopSoundMasterllLoopSoundSlavellPlaySoundllPlaySoundSlavellPreloadSoundllSetSoundQueueingllSetSoundRadiusllStopSoundllTriggerSoundllTriggerSoundLimited
Original wiki source
Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.