G.DynamicLight
From GMod Wiki
Function | |
Syntax |
DynamicLight( Integer Unique Identifier ) Where is this used? |
Description: | |
Creates a dynamic light and returns a table to define it. | |
Returns: | Table |
Part of Library: | Global Functions |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=G.DynamicLight]G.DynamicLight [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Additional Notes
- It is common practice to remove the light 1-second after the last update.
- Unique Identifier is typically the source entity's index which will allow you to update it.
- You can give a Unique Identifier of 0 (zero) which will always create a new light.
- There are some more values that can be used MinLight, Style, Key, InnerAngle, OuterAngle.
- The style is using the Render FX constants.
All these styles only controll the brightness.
- MinLight seems to set the minimum Brightness.
It does not seem to use the same scale as Brightness, MinLight seems to range from 0 - 1, when MinLight is set to 0 however, the light will NOT go completly dark.