Difference between revisions of "GetVolume"
From The Official Visionaire Studio: Adventure Game Engine Wiki
Line 25: | Line 25: | ||
<syntaxhighlight> | <syntaxhighlight> | ||
-- is music volume over 50%? | -- is music volume over 50%? | ||
− | if getVolume( | + | if getVolume(eMusicVolume) > 50 then |
-- do some action! | -- do some action! | ||
end | end | ||
-- is sound fx volume less than 25%? | -- is sound fx volume less than 25%? | ||
− | if getVolume( | + | if getVolume(eSoundVolume) < 25 then |
-- do some action! | -- do some action! | ||
end | end | ||
-- is speech volume more than or equal to 80%? | -- is speech volume more than or equal to 80%? | ||
− | if getVolume( | + | if getVolume(eSpeechVolume) >= 80 then |
-- do some action! | -- do some action! | ||
end | end | ||
-- is movie volume at 50%? | -- is movie volume at 50%? | ||
− | if getVolume( | + | if getVolume(eMovieVolume) == 50 then |
-- do some action! | -- do some action! | ||
end | end | ||
-- is global (master) volume not equal to 50%? | -- is global (master) volume not equal to 50%? | ||
− | if getVolume( | + | if getVolume(eGlobalVolume) ~= 50 then |
-- do some action! | -- do some action! | ||
end | end |
Revision as of 18:12, 30 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
日本語 – 正體中文 – 한국어 – Dansk – Deutsch – English – Español – Français – Italiano – Nederlands – Polski – Português – Svenska – Русский |
Relevant Pages: setVolume |