Is this possible with Lua? And if so is it possible to find a env_sun or light_environment and change it's keyvalues?
local envir = ents.FindByClass("light_environment")
for _, lght in pairs(envir) do
lght:SetKeyValue(etc.... etc... etc...)
end
That's for keyvalues.. not sure about changing the skybox
Can't change a skybox easily.
Only a retexture I think.
[lua]
GetWorldEntity():SetKeyValue("skyname", "sky_day01_04")
[/lua]
I have no idea if you can even change the skybox in-game.
you can do sv_skyname *skybox* in console
But you have to rejoin to see the difference.
[QUOTE=CapsAdmin;14419159]you can do sv_skyname *skybox* in console
But you have to rejoin to see the difference.[/QUOTE]
Yea, that works. And it is the only way I guess.
Its not all that difficult to alter the skybox on the client. As I had [url=http://www.foszor.com/dump/garrysmod/projects/daynight/]tested[/url] a long time ago, you can change the colors relatively easily.
My method required a custom map, but Andy Vincent found a neat way of doing it through modifying the material information, which he pasted [url=http://luabin.foszor.com/855]here[/url]
How Do You USe Andy Vicents Way Do You Just Put It In Autorun?
[QUOTE=foszor;14444713]Its not all that difficult to alter the skybox on the client. As I had [url=http://www.foszor.com/dump/garrysmod/projects/daynight/]tested[/url] a long time ago, you can change the colors relatively easily.
My method required a custom map, but Andy Vincent found a neat way of doing it through modifying the material information, which he pasted [url=http://luabin.foszor.com/855]here[/url][/QUOTE]
Started this script, and get something like that:
[URL=http://radikal.ru/F/s39.radikal.ru/i083/0908/49/41e637c7672a.jpg.html][IMG]http://s39.radikal.ru/i083/0908/49/41e637c7672at.jpg[/IMG][/URL]
Only one zone change lighthing - because i put lamp there.
Is there any way to get this sctipt working?
[QUOTE=Pureluck;14447728]How Do You USe Andy Vicents Way Do You Just Put It In Autorun?[/QUOTE]
Don't type "Like This, It's Annoying." No you don't just put it in autorun....
Sorry, you need to Log In to post a reply to this thread.