Adds handy meta object, methods and functions for working with dynamic light sources.
-
numbergame.GetDynamicLightCount() - Returns the number of valid dynamic light objects. -
dlightgame.GetDynamicLight(numberindex ) - Returns an existing light object based on a unique index. -
GM:DLightCreated(
dlightlight ) - This hook is called if a new dynamic light object has been created. -
GM:DLightRemoved(
dlightlight ) - This hook is called if the dynamic light object has been removed.
-
DynamicLightdlight:GetLight() - Returns a standard dynamic light object, which isuserdata. -
booleandlight:IsValid() - Returns whether the light source is valid or not. -
numberdlight:LightIndex() - Returns a uniquedlightindex. -
vectordlight:GetPos() - Returns the light source position in the world. (def.0 0 0) -
dlight:SetPos(vectorvec ) - Sets the position of light source in the world. -
colordlight:GetColor() - Returns color of light source. (def.255 255 255 255) -
dlight:SetColor(colorcol ) - Sets color of the light source. -
numberdlight:GetAlpha() - Returns alpha of the light source. (def.255) -
dlight:SetAlpha(numbera ) - Sets alpha of the light source. -
numberdlight:GetDieTime() - Returns time when the light source will die, the default is infinity. (def.inf) -
dlight:SetDeathTime(numberint ) - Sets time of death of the light source. -
numberdlight:GetLifeTime() - Returns the lifetime remaining of the light source. (def.-inf) -
dlight:SetLifeTime(numberint ) - Sets lifetime of the light source. -
numberdlight:GetBrightness() - Returns brightness of the light source. (def.1) -
dlight:SetBrightness(numberint ) - Sets brightness of the light source. -
numberdlight:GetSize() - Returns light source size. (def.64) -
dlight:SetSize(numberint ) - Sets light source size. -
numberdlight:GetStyle() - Returns light source style. (See Appearances) -
dlight:SetStyle(numberint ) - Sets light source style. (See Appearances) -
booleandlight:GetNoWorld() - Returns whether light should not illuminate the world. (def.false) -
dlight:SetNoWorld(booleanbool ) - Sets a restriction on illumination of the light of the world. -
booleandlight:GetNoModel() - Returns whether light should not illuminate the models and entities. (def.false) -
dlight:SetNoModel(booleanbool ) - Sets a restriction on light should not illuminate the models and entities. -
numberdlight:GetMinLight() - Returns the minimum light level. (def.0) -
dlight:SetMinLight(numberint ) - Sets the minimum light level.