Element/Light: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "__NOTOC__ {{New feature/item|9.07048|1.4.0|7048| The light class represents colored, 3D lights in the GTA world. There are a couple different types of lights, which are point ...")
 
m (Добавление языков)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{New feature/item|9.07048|1.4.0|7048|
{{New feature/item|3.0150|1.5.0|7048|
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