Is there any way to remove the sun in TF2?

I’d like to have a quick way to simulate night time on TF2 maps, is there any way to completely remove the sun as a light source? I’ve tried using the fog tool, and it works fairly well for indoor areas, but the sky is still as bright as, well, day, in outside areas.

If not, what is the easiest way to simulate night time? I’m hoping the answer isn’t ‘make a night version of the map’

Remove env_sun or make your own skybox.

Something like this:


entClasses = {"env_sun" , "light_environment"}
hook.Add("InitPostEntity" , "Delaying" , function()
	for k , v in pairs(entsClasses) do
		for a , b in pairs(ents.FindByClass(v)) do
			b:Remove()
		end
	end
end )



Expect dodgy shadows if it works

How exactly would I remove env_sun or use that script thingy?

Sorry, I’m pretty new to GMod so I don’t really know any of the more advanced stuff yet.

Anyone?

You’ll need to open the map and delete the env_sun entity.

For the script, place it in your lua/autorun folder called something like removesun.lua

Or, in game: ent_remove_all env_sun.