SetSoundGain

From MaratisWiki
(Difference between revisions)
Jump to: navigation, search
m
m
 
Line 5: Line 5:
 
{{lua-function-param|object|object to operate on}}
 
{{lua-function-param|object|object to operate on}}
 
{{lua-function-param|gain|gain of sound}}
 
{{lua-function-param|gain|gain of sound}}
 +
 +
    setSoundGain(Sound, 0.5) ''--set sound volume at 50%''
  
 
'''Note:'''
 
'''Note:'''
 
* The maximum value is 1
 
* The maximum value is 1
 
* The lowest value is 0
 
* The lowest value is 0
 
'''Example:'''
 
 
    setSoundGain(Sound, 0.5) ''--set sound volume at 50%''
 
  
 
[[Category:Lua scripting]]
 
[[Category:Lua scripting]]
 
[[Category:Lua function]]
 
[[Category:Lua function]]
 
[[Category:Sound]]
 
[[Category:Sound]]

Latest revision as of 01:03, 9 February 2014

setSoundGain(object, gain)

Change the current sound gain.

  • object : object to operate on
  • gain : gain of sound
   setSoundGain(Sound, 0.5) --set sound volume at 50%

Note:

  • The maximum value is 1
  • The lowest value is 0
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox