Env fade

From Valve Developer Community
< Zh
Revision as of 01:54, 13 October 2019 by 求生的兔 (talk | contribs) (Created page with "{{lang|Env fade}} left|link={{point_ent:zh|env_fade}} 根据颜色来渐变。 添加'''Duration''' 和 '''Hold Time''' 一起使用才能使得实体有...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
English (en)Русский (ru)中文 (zh)Translate (Translate)
Env fade.png

起源 env_fade是一个存在于所有的 起源 游戏的点实体。 根据颜色来渐变。 添加DurationHold 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)]) <字符串(en)>
The time that it will take to fade the screen in or out.
Hold Fade (seconds) (holdtime) ([todo internal name (i)]) <字符串(en)>
The time to hold the faded in/out state.
Fade Alpha (renderamt) ([todo internal name (i)]) <整数(en)>
Alpha of the fade, where 0 = fully transparent and 255 = fully opaque.
Fade Color (R G B) (rendercolor) ([todo internal name (i)]) <color255(en)>
Fade color.
Reverse Fade Duration (seconds) (ReverseFadeDuration) ([todo internal name (i)]) <浮点型(en)> (存在于自 传送门2 以来)
The duration of the reverse fade.


Inputs

Fade
Start the screen fade.
FadeReverse  (存在于自 传送门2 以来)
Begin doing the reverse of the current fade.
Alpha  不存在于FGD!
Changes Fade Alpha.
Color  不存在于FGD!
Changes Fade Color.


Outputs

OnBeginFade
Fired when the fade has begun.