Difference between revisions of "GetVolume"

From The Official Visionaire Studio: Adventure Game Engine Wiki
Line 1: Line 1:
<div class="toccolours mw-collapsible mw-collapsed" style="background: #f0f0f0; border: 1px dashed darkgrey" width="100%">
+
<div class="toccolours mw-collapsible mw-collapsed tbl-ds">
<b>Command History</b>
+
<span class="bold">Command History</span>
 
<div class="mw-collapsible-content">
 
<div class="mw-collapsible-content">
<div style="background:#ebebeb" width="100%">Available since <span style="color:orange">v3.7</span></div>
+
<div class="alt-bg">Available since v3.7</div>
<div>MovieVolume & GlobalVolume added to <span style="color:orange">v3.8</span></div>
+
<div>MovieVolume & GlobalVolume added to v3.8</div>
 
</div></div>
 
</div></div>
  
  
 
Allows the user to check current volume levels of: music, sound fx, speech, movies & global(master)
 
Allows the user to check current 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%">
+
<div class="toccolours mw-collapsible mw-collapsed tbl-ds">
<b>Additional Info</b>
+
<span class="bold">Additional Info</span>
 
<div class="mw-collapsible-content">
 
<div class="mw-collapsible-content">
 
<div>These are the numbers used inside of the getVolume(brackets) to check specific volume types! <br/>
 
<div>These are the numbers used inside of the getVolume(brackets) to check specific volume types! <br/>
<pre>eMusicVolume (0), eSoundVolume (1), eSpeechVolume (2), eMovieVolume (3) or eGlobalVolume (4)</pre></div>
+
<pre>eMusicVolume(0), eSoundVolume(1), eSpeechVolume(2), eMovieVolume(3) or eGlobalVolume(4)</pre></div>
 
</div></div>
 
</div></div>
  
Line 52: Line 52:
  
  
<b><u>Arguments</u></b>
+
<span class="bold underline">Arguments</span>
  
<b>type</b>: integer (number) <br/>
+
<span class="bold underline">type</span>: 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)
  
  
<b><u>Flags</u></b>
+
<span class="bold underline">Flags</span>
  
 
none
 
none
  
  
<b><u>Return</u></b>
+
<span class="bold underline">Return</span>
  
<b>volume</b> <br/>
+
<span class="bold">volume</span> <br/>
 
The queried volume
 
The queried volume
 
{{i18n|GetVolume}} <br/>
 
{{i18n|GetVolume}} <br/>
{| style="background: #f0f0f0; border: 1px dashed darkgrey" width="100%"
+
{| class="tbl-ds"
 
|-
 
|-
|<b>Relevant Pages</b>: [[SetVolume|setVolume]]
+
|<span class="bold">Relevant Pages</span>: [[SetVolume|setVolume]]
 
|}
 
|}

Revision as of 01:28, 31 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(eMusicVolume) > 50 then
 -- do some action!
end

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

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

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

-- is global (master) volume not equal to 50%?
if getVolume(eGlobalVolume) ~= 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
The queried volume


Relevant Pages: setVolume