LlAdjustSoundVolume
Looking for the current API? Open the llAdjustSoundVolume reference →
Overview
Adjusts
volume of attached sound.Function variants
llAdjustSoundVolume
llLinkAdjustSoundVolume
Caveats
Not work llTriggerSound and llCollisionSound
Examples
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");
}
}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);
}
}See also: functions
History
Added in SL 0.2.0
Shared wiki helpers
The original page also injects shared parameter notes, caveats or issue information through these helpers. Their conditional MediaWiki logic is not reproduced here; inspect the preserved helper source for additional material.
Original shared helper source (conditional wiki logic is not evaluated)
<noinclude>{{Multi-lang|category=LSL}}</noinclude>{{LSL Injection Test}}{{#if:
{{#vardefine:p_{{{1|none}}}_hover|between 0.0 (silent) and 1.0 (loud) (0.0 <= {{{1|none}}} <= 1.0)}}
{{#vardefine:p_{{{1|none}}}_desc|between 0.0 (silent) and 1.0 (loud) (<code>0.0 <= {{LSLPT|{{{1|none}}}}} <= 1.0</code>)}}
}}<noinclude>
{| {{Prettytable}}
|-{{Hl2}}
!var
!value
|-
|desc
|{{#var:p_{{{1|none}}}_desc}}
|-
|hover
|{{#var:p_{{{1|none}}}_hover}}
|}
</noinclude>Template:LSL Function/link-face
Original shared helper source (conditional wiki logic is not evaluated)
{{LSL Injection Test}}{{#if:{{{1|}}}|{{LSL Function/link|{{{1}}}|nogroup={{{nogroup|}}}}}}}{{#if:{{{2|}}}|{{LSL_Function/face|{{{2}}}}}}}{{#if:
{{#vardefine:also_functions|{{#var:also_functions}}
{{LSL DefineRow||[[llGetLinkNumberOfSides]]|Returns the number of faces of the linked prim.}}}}
}}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.