ZDoom Line Specials

115:Light_Flicker

Name

Light_Flicker — randomly switches the light in a sector between two light levels.

Synopsis

Light_Flicker (tag, upper, lower);
Light_Flicker (
  tag,       // Tag of affected sector
  upper,     // Upper light level
  lower      // Lower light level
);

Parameters

tag
The tag of the sector or sectors to change the light in.
upper
The maximum light level to jump to. This can be no higher than 255.
lower
The minimum light level to jump to. This can be no lower than 0.

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 the upper and lower levels instantly with a random delay between 0.2 and 1.8 seconds. For a special that smoothly alternates between two light levels, use Light_Glow instead.

ACS Equivalent

If you want to use ACS to achieve the same effect as this special, you can use code similar to the following inside a script. This could be useful if you want the ability to stop the effect after it starts, because Light_Flicker never ends.

Light_ChangeToValue (tag, upper);
delay (random (0, 1) * 64 + 1);
while (1)
{
    Light_ChangeToValue (tag, lower);
    delay (random (1,8));
    Light_ChangeToValue (tag, upper);
    delay (random (1,32));
}

First Available In

Hexen

See Also

Light_ChangeToValue | Light_Glow | Light_Strobe