Garry's Mod Wiki

Revision Difference

Structures/DynamicLight#517049

<cat>struct</cat> <structure> <description> Structure for <page>Global.DynamicLight</page>. All members are case insensitive. <note>This is an actual class named **dlight_t**, not a table.</note> </description> <fields>{{StructureField|number|brightness|The brightness of the light.</fields>⤶ <fields>⤶ <item name="brightness" type="number">The brightness of the light.</item>⤶ <item name="decay" type="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.</item>⤶ <item name="dietime" type="number">Time after which light will be removed.⤶ ⤶ This is relative to <page>Global.CurTime</page>. If you put in a value that is less than or equal to <page>Global.CurTime</page>, 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.</item>⤶ {{StructureField|Vector|dir|The light direction. Used with **InnerAngle** and **OuterAngle**.|Vector( 0, 0, 0 )⤶ </fields>⤶ </structure> {{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.⤶ }}{{StructureField|number|dietime|Time after which light will be removed.⤶ ⤶ This is relative to <page>Global.CurTime</page>. If you put in a value that is less than or equal to <page>Global.CurTime</page>, 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.⤶ }}{{StructureField|Vector|dir|The light direction. Used with **InnerAngle** and **OuterAngle**.|Vector( 0, 0, 0 )}}{{StructureField|number|innerangle|The closer this is to zero, the smoother the light will be. Requires **Dir** and **OuterAngle** to be set.|0}}{{StructureField|number|outerangle|The angle of the Dynamic Light. Requires **Dir** to be set.|0}}{{StructureField|number|key|Makes the light brighter and flicker? Changing the value does not seem to affect anything.}}{{StructureField|number|minlight|Minimum light|0}}{{StructureField|boolean|noworld|Don't light the world. Has no effect for elights since they never light the world.|false}}{{StructureField|boolean|nomodel|Don't light models|false}}{{StructureField|Vector|pos|Position of the light}}{{StructureField|number|size|Radius of the light}}{{StructureField|number|style|Flicker style, see [this page](https://developer.valvesoftware.com/wiki/Light_dynamic#Appearances) for examples.}}{{StructureField|number|b|The blue part of the color}}{{StructureField|number|g|The green part of the color}}{{StructureField|number|r|The red part of the color}}⤶ }} {{StructureField|number|innerangle|The closer this is to zero, the smoother the light will be. Requires **Dir** and **OuterAngle** to be set.|0}}{{StructureField|number|outerangle|The angle of the Dynamic Light. Requires **Dir** to be set.|0}}<item name="key" type="number">Makes the light brighter and flicker? Changing the value does not seem to affect anything.</item>⤶ {{StructureField|number|minlight|Minimum light|0}}{{StructureField|boolean|noworld|Don't light the world. Has no effect for elights since they never light the world.|false}}{{StructureField|boolean|nomodel|Don't light models|false}}<item name="pos" type="Vector">Position of the light</item>⤶ <item name="size" type="number">Radius of the light</item>⤶ <item name="style" type="number">Flicker style, see [this page](https://developer.valvesoftware.com/wiki/Light_dynamic#Appearances) for examples.</item>⤶ <item name="b" type="number">The blue part of the color</item>⤶ <item name="g" type="number">The green part of the color</item>⤶ <item name="r" type="number">The red part of the color</item>⤶ ⤶ }}