From ZDoom Wiki
Jump to navigation Jump to search

213:Sector_SetFade (tag, r, g, b)

  • tag: Tag of affected sector
  • r: Amount of red to fade to
  • g: Amount of green to fade to
  • b: Amount of blue to fade to

Sets the color that light in the tagged sectors fade to as they get further away from the viewer. This will give the sector a “fog” effect and can greatly enhance the mood of a level. By default, this is whatever the level's fade is specified as being in a MAPINFO lump, or black, if it does not specify a fade. The note about changing a sector's color during the middle of gameplay also applies here. You can use the testfade console command to test a fade from within the game. Keep in mind that Sector_SetFade is affected by a sector's light, so a faded sector with a light value of 255 will have virtually no visible fade color, and a faded sector with a light value of 0 will be nearly a solid color.


If you are using UDMF for your map, and do not intend to change the fade color later on, you can set a sector's fade without the need of this special. You can find it under a sector's custom tab, and the values it requires are in hex, i.e. RRGGBB.