Garry's Mod Wiki

DynamicLight

Description

Structure for DynamicLight. All members are case insensitive.

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

Parameters

brightness [number]

The brightness of the light.

decay [number]

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.

dietime [number]

Time after which light will be removed.

This is relative to CurTime. If you put in a value that is less than or equal to CurTime, the light will not behave properly.

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

dir [Vector]

The light direction. Used with InnerAngle and OuterAngle.

Default: Vector( 0, 0, 0 )

innerangle [number]

The closer this is to zero, the smoother the light will be. Requires Dir and OuterAngle to be set.

Default: 0

outerangle [number]

The angle of the Dynamic Light. Requires Dir to be set.

Default: 0

key [number]

Makes the light brighter and flicker? Changing the value does not seem to affect anything.

minlight [number]

Minimum light

Default: 0

noworld [boolean]

Don't light the world. Has no effect for elights since they never light the world.

Default: false

nomodel [boolean]

Don't light models

Default: false

pos [Vector]

Position of the light

size [number]

Radius of the light

style [number]

Flicker style, see this page for examples.

b [number]

The blue part of the color

g [number]

The green part of the color

r [number]

The red part of the color

Page Links


Special Pages


Wikis

?

Render Time: 43ms

DB GetPage 4
Generate Html 16
SaveChanges (1) 8
Render Body 0
Render Sidebar 11