Element/Light: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (Changed version from 1.4.0 to 1.5 (it wasn't implemented in 1.4))
m (Добавление языков)
 
(2 intermediate revisions by 2 users not shown)
Line 3: Line 3:
The light class represents colored, 3D lights in the GTA world. There are a couple different types of lights, which are point lights, spot lights and dark lights.
The light class represents colored, 3D lights in the GTA world. There are a couple different types of lights, which are point lights, spot lights and dark lights.


The element type of this class is '''"light"'''.
The element type of this class is '''"light"'''.}}
}}
 
{{Note|The XML syntax is not implemented yet, but is a representation of what it would be if implemented.}}
{{Note|The XML syntax is not implemented yet, but is a representation of what it would be if implemented.}}


Line 32: Line 30:
{{Client light functions}}
{{Client light functions}}
[[Category:Element Types]]
[[Category:Element Types]]
[[en:Element/Light]]
[[ru:Element/Light]]
[[hu:Element/Light]]

Latest revision as of 18:36, 15 April 2021

The light class represents colored, 3D lights in the GTA world. There are a couple different types of lights, which are point lights, spot lights and dark lights.

The element type of this class is "light".

[[{{{image}}}|link=|]] Note: The XML syntax is not implemented yet, but is a representation of what it would be if implemented.

XML syntax

<light posX="" posY="" posZ="" type="" radius="" color="" dirX="" dirY="" dirZ="" shadows="" />

Required Attributes

  • lightType: An integer representing the type of light to create.
    • 0: Point light, which illuminates surroundings evenly across the light radius.
    • 1: Spot light, which illuminates the direction of the light defined by dirX, dirY and dirZ.
    • 2: Dark light, which darkens its surrounding elements to full black.
  • posX: A floating point number representing the X coordinate on the map.
  • posY: A floating point number representing the Y coordinate on the map.
  • posZ: A floating point number representing the Z coordinate on the map.

Optional Arguments

NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use. For more information on optional arguments, see optional arguments.

  • radius: A floating point number representing the radius of the light.
  • color: The color of the light in HTML style format #RRGGBB, defaults to black (invisible) if not specified.
  • dirX: A floating point number representing the light direction's X coordinate on the map.
  • dirY: A floating point number representing the light direction's Y coordinate on the map.
  • dirZ: A floating point number representing the light direction's Z coordinate on the map.
  • shadows: A boolean representing whether or not does the light cast shadows.

Related scripting functions