Env fade: Difference between revisions
Jump to navigation
Jump to search
(updates) |
Gtamike TSGK (talk | contribs) (Image added) |
||
Line 1: | Line 1: | ||
{{ | {{otherlang2 | ||
|ru=env_fade:ru | |||
}} | |||
{{ | {{base point|env_fade}} | ||
{{clr}} | ==Entity description== | ||
[[File:env_fade.png|left|link=]] | |||
It controls screen fades. Screen fades are used to blend regular game imagery to or from a solid color. Add '''duration''' and '''holdtime''' together for the total time this entity will be in effect. | |||
The modulate flag on <code>env_fade</code> uses a different kind of blending to achieve the fade. The normal fade does a straight weighted blend between the screen and the fading color (i.e. the fade color becomes a more/less opaque overlay over the scene). Modulate actually attenuates the screen colors in RGB with the fade color. So you could, for example, remove all of the red and blue from a scene with modulate and be left with a green overlay - well, sort of night vision anyway. The fade color for that would be pure green with modulate.{{clr}} | |||
== | == Keyvalues == | ||
{{ | {{KV|Duration (seconds)|string|The time that it will take to fade the screen in or out.}} | ||
{{ | {{KV|Hold Fade (seconds)|string|The time to hold the faded in/out state.}} | ||
{{ | {{KV|Fade Alpha|integer|Alpha of the fade, where 0 {{=}} fully transparent and 255 {{=}} fully opaque.}} | ||
{{ | {{KV|Fade Color (R G B)|color255|Fade color.}} | ||
{{KV|Reverse Fade Duration (seconds)|float|The duration of the reverse fade.|since=P2}} | |||
{{KV Targetname}} | |||
==Flags== | == Flags == | ||
*1: Fade From | [[File:Env fade flag 4.jpg|thumb|150px|right|The Flags menu will show this for Flag 4 (Turn off SmartEdit and type spawnflags 4).]] | ||
*2: Modulate | * 1 : Fade From | ||
*4: Triggering player only {{ | :Essentially a "fade in," where the screen begins from an opaque color. | ||
*8: Stay Out | * 2 : Modulate | ||
:Use attenuation blending, see [[#Entity Description|Entity Description]]. | |||
* 4 : Triggering player only | |||
:Only affect activator. | |||
:{{note|This flag exists in all Source games, but isn't listed in the FGD, if you don't want to edit the FGD to get it, just add 4 to your current spawnflags.}} | |||
* 8 : Stay Out | |||
:The fade remains indefinitely until another fade deactivates it. This prevents the ondeath-fadeout used in Portal 2. | |||
==Inputs== | ==Inputs== | ||
{{IO|Fade|Start the screen fade.}} | {{IO|Fade|Start the screen fade.}} | ||
{{IO|FadeReverse|Begin doing the reverse of the current fade.|since=P2}} | {{IO|FadeReverse|Begin doing the reverse of the current fade.|since=P2}} | ||
{{I Targetname}} | |||
{{I | |||
==Outputs== | ==Outputs== | ||
{{IO|OnBeginFade|Fired when the fade has begun.}} | {{IO|OnBeginFade|Fired when the fade has begun. {{activator|activator}}}} | ||
{{O | {{O Targetname}} | ||
[[Category:GUI Entities]] | [[Category:GUI Entities]] |
Revision as of 06:31, 20 November 2018
Entity description

It controls screen fades. Screen fades are used to blend regular game imagery to or from a solid color. Add duration and holdtime together for the total time this entity will be in effect.
The modulate flag on env_fade
uses a different kind of blending to achieve the fade. The normal fade does a straight weighted blend between the screen and the fading color (i.e. the fade color becomes a more/less opaque overlay over the scene). Modulate actually attenuates the screen colors in RGB with the fade color. So you could, for example, remove all of the red and blue from a scene with modulate and be left with a green overlay - well, sort of night vision anyway. The fade color for that would be pure green with modulate.
Keyvalues
- Duration (seconds) ([todo internal name (i)]) <string>
- The time that it will take to fade the screen in or out.
- Fade Alpha ([todo internal name (i)]) <integer>
- Alpha of the fade, where 0 = fully transparent and 255 = fully opaque.
- Reverse Fade Duration (seconds) ([todo internal name (i)]) <float> (in all games since
)
- The duration of the reverse fade.
- Name (targetname) <string>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentname
ortarget
).
Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities
Flags
- 1 : Fade From
- Essentially a "fade in," where the screen begins from an opaque color.
- 2 : Modulate
- Use attenuation blending, see Entity Description.
- 4 : Triggering player only
- Only affect activator.
Note:This flag exists in all Source games, but isn't listed in the FGD, if you don't want to edit the FGD to get it, just add 4 to your current spawnflags.
- 8 : Stay Out
- The fade remains indefinitely until another fade deactivates it. This prevents the ondeath-fadeout used in Portal 2.
Inputs
- Fade
- Start the screen fade.
- FadeReverse (in all games since
)
- Begin doing the reverse of the current fade.
Outputs
- OnBeginFade
- Fired when the fade has begun. (!activator is the activator)