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.

innerangle [number]

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

outerangle [number]

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

key [number]

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

minlight [number]

Minimum light

noworld [boolean]

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

nomodel [boolean]

Don't light models

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: 209ms

DB GetPage 15
Generate Html 22
SaveChanges 152
Render Body 0
Render Sidebar 18