Env screenoverlay

From Valve Developer Community
< Zh
Revision as of 06:18, 18 November 2019 by 求生的兔 (talk | contribs) (Created page with "{{lang|Env screenoverlay}} File:env_screenoverlay.jpg|thumb|320px|right|一个<code>env_screenoverlay</code> 与贴图 <code>effects/combine_binocoverlay</code> 的效果,...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
English (en)中文 (zh)Translate (Translate)
一个env_screenoverlay 与贴图 effects/combine_binocoverlay 的效果,在d2_coast_03.

起源 env_screenoverlay是一个存在于所有的 起源 游戏的点实体。 可以显示和控制在屏幕上的覆盖贴图,用来显示在玩家屏幕上。适合制造醉酒效果以及传送残影或者提示。

Template:注意

Note.png注意:In 传送门2, screen overlays are disabled by default. You must set r_drawscreenoverlay 1 to enable.
C++ 在源代码中,它由 class CEnvScreenOverlay 代表,定义于 env_screenoverlay.cpp

Materials

You can use any material as an overlay, but UnlitGeneric materials are the least likely to have any visual bugs.

Valve provides 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
Warped distortion, somewhat similar the one seen on strider charge shots.
tp_eyefx/tp_black
Black. 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
effects/tp_refract
Red/Orange Refractive overlay
glass/glasswindow_refract01
As if looking through a glass Observation window from Portal

Flags

  • 1: Allow Suit Zoom

Keyvalues

Overlay Name 1 (OverlayName1) ([todo internal name (i)]) to Overlay Name 10 (OverlayName10) <字符串(en)>
Name of the first overlay material to display.
Overlay Duration 1 (OverlayTime1) ([todo internal name (i)]) to Overlay Duration 10 (OverlayTime10) <浮点型(en)>
Amount of time that the overlay should be displayed for, after which it will begin showing the next overlay. Setting this to -1 will make the entity display the overlay indefinitely, until it's forced to change by an input.


Inputs

StartOverlays
Start displaying the first overlay.
StopOverlays
Stop displaying any overlays.
SwitchOverlay <整数(en)>
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

See Also

  • Video with some overlays.