GetSectorLightLevel

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);
}

This article is issued from Zdoom. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.