GetSoundGain

From MaratisWiki
(Difference between revisions)
Jump to: navigation, search
(Created page with "Get the sound gain. Example, print the sound gain in the console: Sound = getObject("Sound") function onSceneUpdate() SndGain = getSoundGain(Sound) i...")
 
m
 
(3 intermediate revisions by one user not shown)
Line 1: Line 1:
 +
{{lua-function|getSoundGain|object}}
 +
 
Get the sound gain.
 
Get the sound gain.
  
Example, print the sound gain in the console:
+
{{lua-function-param|object|object to operate on}}
 +
 
 +
'''Example:''' Print the sound gain in the console:
  
 
     Sound = getObject("Sound")
 
     Sound = getObject("Sound")
Line 8: Line 12:
 
         if isKeyPressed("A") then print(SndGain) end
 
         if isKeyPressed("A") then print(SndGain) end
 
     end
 
     end
 +
 +
[[Category:Lua scripting]]
 +
[[Category:Lua function]]
 +
[[Category:Sound]]

Latest revision as of 00:02, 9 February 2014

getSoundGain(object)

Get the sound gain.

  • object : object to operate on

Example: Print the sound gain in the console:

   Sound = getObject("Sound")
   function onSceneUpdate()
       SndGain = getSoundGain(Sound)
       if isKeyPressed("A") then print(SndGain) end
   end
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox