Changing a skybox texture?

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…)

That’s for keyvalues… not sure about changing the skybox

Can’t change a skybox easily.
Only a retexture I think.

GetWorldEntity():SetKeyValue(“skyname”, “sky_day01_04”)

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.

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 tested 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 here

How Do You USe Andy Vicents Way Do You Just Put It In Autorun?

Started this script, and get something like that:
Only one zone change lighthing - because i put lamp there.
Is there any way to get this sctipt working?

Don’t type “Like This, It’s Annoying.” No you don’t just put it in autorun…