render.LightStyle

Anyone know how to fully use this? Putting “b” through “z” as the second argument and 0 as first argument. But what is the first argument used for? Couldn’t find any documentation in the wiki or the SDK.

Currently trying to make it so it doesn’t have an effect on indoor areas and actually works on static props.

Lightstyles 32-63 (I think, not sure about the first number) are reserved for the “dynamic” toggleable named lights
Lightstyle 0 is the “global” lightmap for all non-toggleable lights
You need to call render.RedownloadAllLightmaps() for any changes to it to take effect

[editline]11th December 2012[/editline]

The function is the most useful for maps compiled with an edited vrad because you can put things like the ambient lighting on a separate lightstyle for some real good day/night, or put day lighting on one lightstyle and night lighting on another

http://hlssmod.net/he_code/game/server/world.cpp



static const char *g_DefaultLightstyles[] =
{
	// 0 normal
	"m",
	// 1 FLICKER (first variety)
	"mmnmmommommnonmmonqnmmo",
	// 2 SLOW STRONG PULSE
	"abcdefghijklmnopqrstuvwxyzyxwvutsrqponmlkjihgfedcba",
	// 3 CANDLE (first variety)
	"mmmmmaaaaammmmmaaaaaabcdefgabcdefg",
	// 4 FAST STROBE
	"mamamamamama",
	// 5 GENTLE PULSE 1
	"jklmnopqrstuvwxyzyxwvutsrqponmlkj",
	// 6 FLICKER (second variety)
	"nmonqnmomnmomomno",
	// 7 CANDLE (second variety)
	"mmmaaaabcdefgmmmmaaaammmaamm",
	// 8 CANDLE (third variety)
	"mmmaaammmaaammmabcdefaaaammmmabcdefmmmaaaa",
	// 9 SLOW STROBE (fourth variety)
	"aaaaaaaazzzzzzzz",
	// 10 FLUORESCENT FLICKER
	"mmamammmmammamamaaamammma",
	// 11 SLOW PULSE NOT FADE TO BLACK
	"abcdefghijklmnopqrrqponmlkjihgfedcba",
	// 12 UNDERWATER LIGHT MUTATION
	// this light only distorts the lightmap - no contribution
	// is made to the brightness of affected surfaces
	"mmnnmmnnnmmnn",
};
// Setup light animation tables. 'a' is total darkness, 'z' is maxbright.


I get how the global lighting and the style string works, I just was wondering how to change direct lighting without changing ambient lighting.