The Overlay entity is similar to the Liquid entity in that it is attached to an empty model and when you enter inside that model a bitmap is overlayed on the camera to change the color of your view. It differs from Liquid in that the bitmap can be animated like a FlipBook and that no damage is done to the player.
The fields for the Overlay entity are:
Field |
Description |
---|---|
Alphamap |
The name of the alpha map to use. If the bitmap is animated this is the base name of the bitmap sequence, as in FlipBook. |
AlphaRate | Amount to decreas alpha per seconds |
Animated |
True if bitmap is animated. |
Bitmap |
Name of bitmap to use. If the bitmap is animated this is the base name of the bitmap sequence, as in FlipBook. |
BitmapCount |
Number of bitmaps in sequence |
Model |
Name of model to attach to |
Speed |
Number of bitmaps per second to play. |
Style |
Animation style, as in FlipBook (0 to 4) |
szEntityName |
Name of this entity |
TintColor |
The color of the bitmap |
Transparency |
Level of transparency of bitmap(0 to 255) |
TriggerName |
name of trigger used to activate Overlay without a model |
If you do not attach the entity to a model (Model entry is NULL) then it can be activated by the trigger specified in TriggerName. If the state of TriggerName is on then the Overlay will be activated and will display on the screen.
You can use the Overlay entity to make a level fade in and fade out. Make up a small (32x32) bitmap that is all black and name it black0.bmp. Add an Overlay to the level with these settings:
Alphamap - black
AlphaRate - 85
Animated - True
Bitmap - black
BitmapCount - 1
Speed - 10
Style - 0
Tint - 0 0 0
Transparency - 255
TriggerName - FadeInNot
Add a LogicGate of Type 2, with the szEntityname set to FadeInNot, and the Trigger1Name set to Remove. This will fade in from black when the level starts in about 3 seconds. Decrease the AlphaRate for a slower fade. To fade out set Transparency to 0 and AlphaRate to -85. Use another trigger to activate the Overlay that goes on when the level is done.