Env fade
< Zh
Jump to navigation
Jump to search

env_fade
是一个存在于所有的 起源 游戏的点实体。 根据颜色来渐变。 添加Duration 和 Hold Time 一起使用才能使得实体有效果。
待完善: This template is currently using deprecated suf or {{Lang}}-based translations. Please use the main {{Code class}} instead, which uses {{Autolang}}.
在源代码中,它由 class
CEnvFade
代表,定义于 EnvFade.cpp
。
ConVars/指令
控制台变量/命令 | 参数或默认值 | 描述符 | 效果 |
---|---|---|---|
fadein | float int int int 0 | Time (seconds), Red, Green, Blue, [待完善] | Makes the screen black (or the specified color), then fades to the normal view. 待完善: Why is the last number required? |
fadeout | float int int int 0 | Time (seconds), Red, Green, Blue, [待完善] | Fades the screen to black (or the specified color). 待完善: Why is the last number required? |
Flags
- 1: Fade From - Screen fades from the specified color instead of to it.
- 2: Modulate - Uses attenuation blending to achieve the fade. The normal fade does a straight weighted blend between the screen and the fading color. Modulate actually attenuates the RGB channels. For example, a color of
0 255 0
would mute the red and blue channels and create a green nightvision-type effect. - 4: Triggering player only 不存在于FGD! - Only affects the screen of the !activator.
!activator
is probably the easiest to reach through a trigger entity. If not checked, the fade will apply to all players. - 8: Stay Out - Fade remains indefinitely until another fade deactivates it.
Keyvalues
- Duration (seconds) (duration) ([todo internal name (i)]) <字符串 >
- The time that it will take to fade the screen in or out.
- Hold Fade (seconds) (holdtime) ([todo internal name (i)]) <字符串 >
- The time to hold the faded in/out state.
- Fade Alpha (renderamt) ([todo internal name (i)]) <整数 >
- Alpha of the fade, where 0 = fully transparent and 255 = fully opaque.
- Reverse Fade Duration (seconds) (ReverseFadeDuration) ([todo internal name (i)]) <浮点型 > (存在于自
以来)
- The duration of the reverse fade.
Inputs
- Fade
- Start the screen fade.
- Alpha 不存在于FGD!
- Changes Fade Alpha.
- Color 不存在于FGD!
- Changes Fade Color.
Outputs
- OnBeginFade
- Fired when the fade has begun.