Structures/DynamicLight

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
m
Line 1: Line 1:
 
{{Structure
 
{{Structure
|Description=Table structure for {{GlobalFunction|DynamicLight}}.
+
|Description=Structure for {{GlobalFunction|DynamicLight}}.<br/>
'''Note! This is an actual class named ''dlight_t'', not a table.'''
+
''Note! This is an actual class named '''dlight_t''', not a table.''
 
|Fields={{StructureField|number|Brightness|The brightness of the light}}{{StructureField|number|Decay|Fade out speed.
 
|Fields={{StructureField|number|Brightness|The brightness of the light}}{{StructureField|number|Decay|Fade out speed.
 
Here's a formula for calculating Decay for your light: 1000 / fadeOutTimeInSeconds. For example setting decay to 1000 would fade out the light in 1 second, 2000 - 0.5 seconds.
 
Here's a formula for calculating Decay for your light: 1000 / fadeOutTimeInSeconds. For example setting decay to 1000 would fade out the light in 1 second, 2000 - 0.5 seconds.

Revision as of 13:05, 4 December 2013

Structure for DynamicLight.

Note! This is an actual class named dlight_t, not a table.

Type Name Description
number Brightness

The brightness of the light

number Decay

Fade out speed. Here's a formula for calculating Decay for your light: 1000 / fadeOutTimeInSeconds. For example setting decay to 1000 would fade out the light in 1 second, 2000 - 0.5 seconds.

number DieTime

Time after which light will be removed. Note, that it does not affect fading out. Light will be removed regardless of it being fully faded out or not.

Vector Dir

The light direction

number InnerAngle

Unknown

number Key

Unknown

number MinLight

Minimum light

boolean NoWorld

Don't light the world

boolean NoModel

Don't light models

number OuterAngle

Unknown

Vector Pos

Position of the light

number Size

Radius of the light

number Style

Flicker style see render FX

number b

The blue part of the color

number g

The green part of the color

number r

The red part of the color

Personal tools
Navigation