Env fade
Jump to navigation
Jump to search

Template:Base point It controls screen fades to or from a solid color. Add Duration and Hold Time together for the total time this entity will be in effect.
ConVars/Commands
Cvar/Command | Parameters or default value | Descriptor | Effect |
---|---|---|---|
fadein | float int int int 0 | Time (seconds), Red, Green, Blue, [Todo] | Makes the screen black (or the specified color), then fades to the normal view. Todo: Why is the last number required? |
fadeout | float int int int 0 | Time (seconds), Red, Green, Blue, [Todo] | Fades the screen to black (or the specified color). Todo: 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)]) <string>
- The time that it will take to fade the screen in or out.
- Hold Fade (seconds) (holdtime) ([todo internal name (i)]) <string>
- The time to hold the faded in/out state.
- Fade Alpha (renderamt) ([todo internal name (i)]) <integer>
- Alpha of the fade, where 0 = fully transparent and 255 = fully opaque.
- Reverse Fade Duration (seconds) (ReverseFadeDuration) ([todo internal name (i)]) <float> (in all games since
)
- The duration of the reverse fade.
Inputs
- Fade
- Start the screen fade.
- FadeReverse (in all games since
)
- 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.