• Creating Static Light
    3 replies, posted
I am attempt to use the following code to make a light local l = ents.Create("light") l:Spawn() l:Activate() l:SetPos( self:GetPos() ) l:SetKeyValue("Linear", 200.0) l:SetKeyValue("Brightness", "255 255 255 5000") l:SetKeyValue("BrightnessHDR", "-1 -1 -1 1") --l:SetKeyValue("_light", "255 0 0 255") l:SetKeyValue("Appearance", "11") l:Fire("TurnOn") l:SetParent( self ) However nothing appears to be emitting light.
"light" entity needs to be compiled with vbsp (to bake a lightmaps into the map), you can't just add it with Lua
Look into env_projectedtexture, could be what you're looking for it's what the lamp tool uses.
Ideally I would have liked to used dynamic_light but since that has a hard limit of 32 this looks like it will do as you can set the limit. Thanks!
Sorry, you need to Log In to post a reply to this thread.