Difference between revisions of "GetVolume"

From The Official Visionaire Studio: Adventure Game Engine Wiki
Line 18: Line 18:
 
Syntax:
 
Syntax:
 
<syntaxhighlight>
 
<syntaxhighlight>
getVolume()
+
getVolume(type)
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Line 54: Line 54:
 
<b><u>Arguments</u></b>
 
<b><u>Arguments</u></b>
  
type: integer <br/>
+
<b>type</b>: integer (number) <br/>
 
The type of volume to return: eMusicVolume (0), eSoundVolume (1), eSpeechVolume (2), eMovieVolume (3) or eGlobalVolume (4)
 
The type of volume to return: eMusicVolume (0), eSoundVolume (1), eSpeechVolume (2), eMovieVolume (3) or eGlobalVolume (4)
  
Flags: none
 
  
Return: volume <br/>
+
<b><u>Flags</u></b>
 +
 
 +
none
 +
 
 +
 
 +
<b><u>Return</u></b>
 +
 
 +
<b>volume<b> <br/>
 
The queried volume
 
The queried volume
{{i18n|GetVolume}}
+
{{i18n|GetVolume}} <br/>
 +
{| style="background: #f0f0f0; border: 1px dashed darkgrey" width="100%"
 +
|-
 +
|<b>Relevant Pages</b>: [[SetVolume|setVolume]]
 +
|}

Revision as of 14:48, 12 March 2013

Command History

Available since v3.7
MovieVolume & GlobalVolume added to v3.8


Allows the user to check current volume levels of: music, sound fx, speech, movies & global(master)

Additional Info

These are the numbers used inside of the getVolume(brackets) to check specific volume types!
eMusicVolume (0), eSoundVolume (1), eSpeechVolume (2), eMovieVolume (3) or eGlobalVolume (4)


Syntax:

getVolume(type)


Example:

-- is music volume over 50%?
if getVolume(0) > 50 then
 -- do some action!
end

-- is sound fx volume less than 25%?
if getVolume(1) < 25 then
 -- do some action!
end

-- is speech volume more than or equal to 80%?
if getVolume(2) >= 80 then
 -- do some action!
end

-- is movie volume at 50%?
if getVolume(3) == 50 then
 -- do some action!
end

-- is global (master) volume not equal to 50%?
if getVolume(4) ~= 50 then
 -- do some action!
end


Arguments

type: integer (number)
The type of volume to return: eMusicVolume (0), eSoundVolume (1), eSpeechVolume (2), eMovieVolume (3) or eGlobalVolume (4)


Flags

none


Return

volume<b>
The queried volume


<b>Relevant Pages: setVolume