• Control an unnamed light_environment with lua?
    7 replies, posted
What I heard from my friends who uses Source SDK is that light_environment is hidden to lua if there is no targetname and inputs issued to it. Is there a way to control it still (Setting a name to it before it hides, etc.)? Without editing the map that is. Probably not...
[b][url=http://wiki.garrysmod.com/?title=Ents.FindByClass]Ents.FindByClass [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]
Like I said, it will be hidden without a targetname even to that command gm_flatgrass has a light_environment, try running "PrintTable(ents.FindByClass("light_environment"))"... It'll return nothing. SOLVED: [code]if string.lower(game.GetMap()) == "rp_evocity_v2d" then function CheckLightEnvs( ent ) if ValidEntity(ent) and ent:GetClass() == 'light_environment' then ent:SetKeyValue("targetname", "lightenv") ServerLog("Found light environment " .. ent:EntIndex()) end end hook.Add("OnEntityCreated", "CheckLightEnvs", CheckLightEnvs) end[/code] Used that script above to set a name... EDIT: Now my map is opposite of fullbright... The props around are still fullbright though.
the think is the hl2 light_enviroment is static, you cant just change its brightness
[QUOTE=blown25;28172594]the thing is the hl2 light_enviroment is static, you cant just change its brightness[/QUOTE] Somehow, it ain't. There is a day/night addon that modifys the light a light_environment got, however, it requires map modification.
[QUOTE=Donkie;28172625]Somehow, it ain't. There is a day/night addon that modifys the light a light_environment got, however, it requires map modification.[/QUOTE] thats cool, any link?
[url]http://www.garrysmod.org/downloads/?a=view&id=75912[/url]
Ent:Fire and i did Ent:Changekeyvalue("Brightness", 0,0,0,0) :frog:
Sorry, you need to Log In to post a reply to this thread.