Difference between revisions of "Global Command: setVolume"
From The Official Visionaire Studio: Adventure Game Engine Wiki
m (EK moved page SetVolume (CMS) to Global Command: setVolume) |
|
(No difference)
|
Latest revision as of 21:37, 4 May 2023
Set the general volume levels for music, sound, speech, videos, and master.
Related functions | getVolume |
Syntax
setVolume(type, volume)
Parameters
Parameter | Type | Supported values | Description |
---|---|---|---|
type | integer | eMusicVolume (0) | The type of volume to return.
|
eSoundVolume (1) | |||
eSpeechVolume (2) | |||
eMovieVolume (3) | |||
eGlobalVolume (4) | |||
volume | integer | The new value for volume in the range of 0 to 100. |
Return values
none
Examples
Example 1: Set the speech volume level to 80.
setVolume(eSpeechVolume, 80)
-- You can also pass the volume type as an integer. The following code will do the same.
setVolume(2, 80)