GetSectorLightLevel

From ZDoom Wiki
Jump to: navigation, search

int GetSectorLightLevel (int tag)

Usage

This returns the sector's light level.

Parameters

  • tag: Tag of the sector.

Return value

Returns the sector's light level as a value between 0 and 255. When used on sectors which share tags, it will return the light level of the sector with the lowest sector number and the matching tag.

Examples

script 1 (int sector)
{
    int l = GetSectorLightLevel (sector);
    Light_ChangeToValue (sector, 8);
    Delay (8);
    Light_ChangeToValue (sector, l);
}