(Formerly known as SetAreaLightLevel, which is now obsolete)
int Region.LightLevel
Gets/sets the region's light level. This does the same thing as the Light Level
textbox in the editor, but allows you to change it at run-time.
The light level is from -100 to 100. This is different from the editor, which
takes values from 0 to 200.
Subtract 100 from the value you would use in the editor when calling this function.
The reason for this discrepancy is legacy reasons from the DOS editor days.
To disable region lighting and tinting effects, set LightLevel to 0.
NOTE: The light level will be reset to the editor settings when the player leaves the
room, so you need to use it in Player Enters Room if you want a permanent
change.
NOTE: Setting a light level will disable any RGB tint set for the region.
Example:
if (GetGlobalInt(10)==1)
region[2].LightLevel = 100;
will set region 2's level light to 100 if the Global Integer 10 is 1.
See Also: Region.Tint
|