GetActorLightLevel
Jump to navigation
Jump to search
int GetActorLightLevel (int tid)
Usage
Returns the light level of the sector the actor is currently in. If tid is 0, it returns the activator's light level. Note that this does not take into account point-based lights in GZDoom's OpenGL mode; it only returns the light level of the actual sector.
Examples
This script checks the light value of the sector the calling actor is in. If it is below 40, the actor will become fuzzy.
script 1 (int boss) { if (GetActorLightLevel(0) < 40) SetActorProperty (boss, APROP_RENDERSTYLE, STYLE_FUZZY); }