SetLightColor

From MaratisWiki
(Difference between revisions)
Jump to: navigation, search
(Created page with "Set light color. Accepts two arguments: Light object and an RGB table. Example: Light = getLight("DayNightLight") -- Set to red setLightColor(Light, {255, 0, 0}) -- Set t...")
 
m
 
(4 intermediate revisions by one user not shown)
Line 1: Line 1:
Set light color. Accepts two arguments: Light object and an RGB table.
+
{{lua-function|setLightColor|object, color}}
 +
 
 +
Set light color. Accepts two arguments, light object and an RGB table.
 +
 
 +
{{lua-function-param|object|object to operate on}}
 +
{{lua-function-param|color|rgb color table}}
  
Example:
 
 
  Light = getLight("DayNightLight")
 
  Light = getLight("DayNightLight")
 
  -- Set to red
 
  -- Set to red
Line 9: Line 13:
 
  -- Set to cyan
 
  -- Set to cyan
 
  setLightColor(Light, {0, 255, 255})
 
  setLightColor(Light, {0, 255, 255})
 +
 +
[[Category:Lua scripting]]
 +
[[Category:Lua function]]
 +
[[Category:Light]]

Latest revision as of 00:30, 9 February 2014

setLightColor(object, color)

Set light color. Accepts two arguments, light object and an RGB table.

  • object : object to operate on
  • color : rgb color table
Light = getLight("DayNightLight")
-- Set to red
setLightColor(Light, {255, 0, 0})
-- Set to green
setLightColor(Light, {0, 255, 0})
-- Set to cyan
setLightColor(Light, {0, 255, 255})
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox