Sector_SetColor

From ZDoom Wiki

Jump to: navigation, search

212:Sector_SetColor (tag, r, g, b, desat)

tag: Tag of affected sector 
r: Amount of red in the light 
g: Amount of green in the light 
b: Amount of blue in the light 
desat: Desaturation of the color

Sets the color of light in a sector. By default, sectors have white light (red, green, blue are all 255). If a sector's color is changed during gameplay, another sector should already have the desired color (possibly by using an open script to set the color of a dummy sector that the player will never see). This is because there can be a noticeable delay while the game constructs the tables for a color for the first time. You can use the testcolor console command to test a color from within the game.

The desat parameter specifies how much the colors in the sector are desaturated. 0 means no desaturation at all resulting in normal colors. 255 means full desaturation, resulting in a colorized black and white display.

Personal tools