ZDoom Line Specials

232:Light_StrobeDoom

Name

Light_StrobeDoom — switches the light level in a sector between two levels at a specific rate.

Synopsis

Light_StrobeDoom (tag, u_tics, l_tics);
Light_StrobeDoom (
  tag,       // Tag of affected sector
  u_tics,    // Time to stay at upper light level
  l_tics     // Time to stay at lower light level
);

Parameters

tag
The tag of the sector or sectors to change the light in.
u_tics
The time, in tics, to stay at the upper level before changing to the lower level.
l_tics
The time, in tics, to stay at the lower level before returning to the upper level.

ACS

This special's function is the same whether you activate it on a line or use it in a script.

Remarks

This special causes the light in a sector to jump between two light levels instantly with a set delay between each transition. This special is similar to Light_Strobe, except the two light levels to jump between are determined by the state of the level when this special is used. The upper light level is the sector's light level when the special is used, and the lower light level is the same as the darkest sector connected to the sector this special is used on. If there is more than one sector matching tag, then each one will be considered separately, as if there were no other sectors with the same tag.

ACS Equivalent

Although this special cannot be emulated exactly with ACS, you can approximate it if you know the sector's initial light level. In the code below, this is labeled as initial. Note that this code will only behave the same as Light_StrobeDoom if every sector matching tag has the same initial light level.

while (1)
{
    delay (u_tics);
    Light_MinNeighbor (tag);
    delay (l_tics);
    Light_ChangeToValue (tag, initial);
}

First Available In

ZDoom 1.16

See Also

Light_ChangeToValue | Light_Strobe | Light_MinNeighbor