Difference between revisions of "SetVolume"

From The Official Visionaire Studio: Adventure Game Engine Wiki
(Redirected page to Global Command: setVolume)
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<div class="toccolours mw-collapsible mw-collapsed" style="background: #f0f0f0; border: 1px dashed darkgrey" width="100%">
+
#REDIRECT [[Global Command: setVolume]]
<b>Command History</b>
 
<div class="mw-collapsible-content">
 
<div style="background:#ebebeb" width="100%">Available since <span style="color:orange">v3.7</span></div>
 
<div>MovieVolume & GlobalVolume added to <span style="color:orange">v3.8</span></div>
 
</div></div>
 
 
 
 
 
Allows the user to set volume levels of: music, sound fx, speech, movies & global(master)
 
<div class="toccolours mw-collapsible mw-collapsed" style="background: #f0f0f0; border: 1px dashed darkgrey" width="100%">
 
<b>Additional Info</b>
 
<div class="mw-collapsible-content">
 
<div>These are the numbers used inside of the setVolume(brackets) to set specific volume types! <br/>
 
<pre>eMusicVolume (0), eSoundVolume (1), eSpeechVolume (2), eMovieVolume (3) or eGlobalVolume (4)</pre></div>
 
</div></div>
 
 
 
 
 
Syntax:
 
<syntaxhighlight>
 
setVolume(type, volume)
 
</syntaxhighlight>
 
 
 
 
 
Example:
 
<syntaxhighlight>
 
-- set music volume to 50%!
 
setVolume(eMusicVolume, 50)
 
 
 
-- set sound fx volume to 50%!
 
setVolume(eSoundVolume, 50)
 
 
 
-- set speech volume to 50%!
 
setVolume(eSpeechVolume, 50)
 
 
 
-- set movie volume to 50%!
 
setVolume(eMovieVolume, 50)
 
 
 
-- set global (master) volume to 50%!
 
setVolume(eGlobalVolume, 50)
 
</syntaxhighlight>
 
 
 
 
 
 
 
<b><u>Arguments</u></b>
 
 
 
<b>type</b>: integer (number) <br/>
 
The type of volume to set: eMusicVolume (0), eSoundVolume (1), eSpeechVolume (2), eMovieVolume (3) or eGlobalVolume (4)
 
 
 
<b>volume</b>: integer (number) <br/>
 
New value for volume. Must be a value between 0 and 100
 
 
 
 
 
<b><u>Flags</u></b>
 
 
 
none
 
 
 
 
 
<b><u>Return</u></b>
 
 
 
none
 
{{i18n|setVolume}} <br/>
 
{| style="background: #f0f0f0; border: 1px dashed darkgrey" width="100%"
 
|-
 
|<b>Relevant Pages</b>: [[GetVolume|getVolume]]
 
|}
 

Latest revision as of 12:31, 19 May 2023