Is there any way to change light environment with lua?
2 replies, posted
Is there any way to change light environment with lua? (For Example: GM_FLATGRASS map)
No, it is impossible, unless you have a map with a named light_environment, (like RP_Evocity_V17x or the map in this upload [URL]http://www.garrysmod.org/downloads/?a=view&id=75912[/URL]). If you do find a map you can change the light_environment with some code like this:
[CODE]local lightenvs = ents.FindByClass("light_environment")
for _, light in pairs(lightenvs) do
if (ValidEntity(light)) then
light:Fire( 'FadeToPattern' , 'a' , 0 ) // Makes the light fully dark, z is fully bright.
end
end
[/CODE]
can you post that script: [url]http://www.garrysmod.org/downloads/?a=view&id=75912[/url]
I can't open it
Sorry, you need to Log In to post a reply to this thread.