Difference between revisions of "SetVolume"
From The Official Visionaire Studio: Adventure Game Engine Wiki
Line 1: | Line 1: | ||
− | + | ==setVolume== | |
− | |||
− | |||
− | |||
− | |||
− | |||
+ | <div class="command-min-version-info">Available since: <span class="command-min-version">v3.0</span></div> | ||
− | + | <div class="command-doc">Sets the general volume for background music, sound or speech output.</div> | |
− | |||
− | |||
− | <div class=" | ||
− | |||
− | |||
− | |||
− | + | Lua Syntax: | |
− | Syntax: | + | <pre class="command-syntax">setVolume(type, volume)</pre> |
− | < | + | ===Arguments=== |
− | setVolume(type, volume) | + | ====type==== |
− | </ | + | :'''int''' - The type of volume to set: eMusicVolume (0), eSoundVolume (1), eSpeechVolume (2), eMovieVolume (3) or eGlobalVolume (4). |
− | + | ====volume==== | |
− | + | :'''int''' - New value for volume. Must be between 0 and 100. | |
− | Example: | + | ===Flags=== |
+ | ===Return Values=== | ||
+ | None. | ||
+ | ===Examples=== | ||
+ | Example 1: set speech volume to 50% | ||
<syntaxhighlight> | <syntaxhighlight> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
setVolume(eSpeechVolume, 50) | setVolume(eSpeechVolume, 50) | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</syntaxhighlight> | </syntaxhighlight> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 17:12, 22 November 2013
setVolume
Available since: v3.0
Sets the general volume for background music, sound or speech output.
Lua Syntax:
setVolume(type, volume)
Arguments
type
- int - The type of volume to set: eMusicVolume (0), eSoundVolume (1), eSpeechVolume (2), eMovieVolume (3) or eGlobalVolume (4).
volume
- int - New value for volume. Must be between 0 and 100.
Flags
Return Values
None.
Examples
Example 1: set speech volume to 50%
setVolume(eSpeechVolume, 50)