env_screenoverlay
From Valve Developer Community
This is a point entity available in all Source games.Contents |
Entity description
An entity that can display and control a set of screen overlays, to be displayed over the player's view. Useful for view effects like drunkenness, or teleporter afterimages, etc.
Materials
You can use any material as an overlay, but UnlitGeneric ones are recommended to avoid artefacting.
Valve provide these materials in the /effects folder:
- combine_binocoverlay
- Combine binoculars
- tp_eyefx/tpeye
- Green teleport shimmer
- tp_eyefx/tpeye2
Red teleport shimmer
- tp_eyefx/tpeye3
- Blue teleport shimmer
- tp_eyefx/tp_eyefx
- Drugged distortion
- tp_eyefx/tp_black
- Black. A probable bug makes it so that a thin border around the overlay is still visible.
- tp_eyefx/tp_eyefx_eli
- Flashing animation of three figures. Hardly usable as an overlay.
These materials are not designed as screen overlays, but will work as one:
- debug/yuv
- Monochrome (Black and white)
- effects/com_shield002a.vmt
- The combine shield shader effect - refraction with drifting squares.
- models/effects/portalfunnel_sheet
- Red-yellow-green scrolling ground overlay
- models/props_combine/portalball001_sheet
- Green downward haze
Keyvalues
-
Targetname:
- Name <string>
- The targetname other entities refer to this entity by.
- OverlayName(1-10)
- <material> Name of the overlay material to display.
- OverlayTime(1-10)
- <float> Amount of time that the overlay should be displayed for, after which it will begin showing the next overlay.
Flags
- 1 : Allow Suit Zoom
Inputs
-
Targetname:
-
Kill - Removes this entity from the world.
-
KillHierarchy - Removes this entity and all its children from the world.
-
AddOutput <string> - Evaluates a keyvalue/output on this entity. It can be potentially very dangerous, use with care.
- Format:
<key> <value> - Format:
<output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, -1 means infinite> -
FireUser1toFireUser4 - Fire the
OnUseroutputs; see User Inputs and Outputs.
- StartOverlays
- Start displaying the first overlay.
- StopOverlays
- Stop displaying any overlays.
- SwitchOverlay <integer>
- Switch to displaying a specific overlay. Pass in the desired overlay number in the parameter. Entering -1 as the value will cause the overlay to display indefinitely.
Outputs
-
Targetname:
-
OnUser1toOnUser4 - Fired in response to the
FireUserinputs; see User Inputs and Outputs. -
OnKilled(New with Left 4 Dead) - Fired when the entity is killed and removed from the game.
See also
- Overlays - A large list of overlays.
