env_screenoverlay

From Source Entities
Jump to navigation Jump to search

Code classes:

env_screenoverlay is a point entity present in all Source games. It can display and control a set of screen overlays, to be displayed over the player's view. Textures which aren't set up to be used with this entity will appear black. See effects/combine_binocoverlay from Hl2.png for a working example.

Note: In multiplayer games, the effect will show to all players at once.

Note: In P2.png these overlays are only visible if r_drawscreenoverlay is set to 1. No other games suffer from this issue.

Bug: In Tf2.png the overlay will conflict with jarate's screen overlay, which will cause one of the two to not appear.

Flags[edit | edit source]

  • 1: Allow Suit Zoom (only available in Hl2.png)

Keyvalues[edit | edit source]

Overlay Name 1 (OverlayName1) to Overlay Name 10 (OverlayName10) <material>
Names of the overlay materials to display.
Overlay Duration 1 (OverlayTime1) to Overlay Duration 9 (OverlayTime9) <float>
Amounts of time that the overlays should be displayed for, after which they will begin showing the next overlay. The last overlay on the list will always display indefinitely.
Overlay Duration 10 (OverlayTime10) <float>
No effect. The 10th overlay will always display indefinitely.

Inputs[edit | edit source]

StartOverlays
Starts displaying the first overlay.
StopOverlays
Stops displaying overlays.
SwitchOverlay <int>
Switches to displaying a specific overlay. Entering -1 as the value will cause the current overlay to display indefinitely.