Env fade: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (expanded definition)
(Cleanup)
Line 1: Line 1:
{{wrongtitle|title=env_fade}}
{{base point|env_fade}}
{{base_point}}[[Category:GUI Entities]]


== Entity description ==
== Entity description ==
Line 8: Line 7:


== Keyvalues ==
== Keyvalues ==
* {{KV Targetname}}
{{KV|Duration (seconds)|string|The time that it will take to fade the screen in or out.}}
* '''duration'''
{{KV|Hold Fade (seconds)|string|The time to hold the faded in/out state.}}
: <integer> The time that it will take to fade the screen in or out.
{{KV|Fade Alpha|integer|Alpha of the fade, where 0 {{=}} fully transparent and 255 {{=}} fully opaque.}}
* '''holdtime'''
{{KV|Fade Color (R G B)|color255|Fade color.}}
: <integer> The time to hold the faded in/out state.
{{KV Targetname}}
* '''renderamt'''
: <[[byte]]> Alpha of the fade, where 0 = fully transparent and 255 = fully opaque.
* '''rendercolor'''
: {{color}} Fade Color


== Flags ==
== Flags ==
Line 28: Line 23:
:The fade remains indefinitely until another fade deactivates it.
:The fade remains indefinitely until another fade deactivates it.


== Inputs ==
==Inputs==
* {{I Targetname}}
{{IO|Fade|Start the screen fade.}}
* {{I RenderFields}}
{{I Targetname}}
* '''Fade'''
: Start the screen fade.


== Outputs ==
==Outputs==
* {{O Targetname}}
{{IO|OnBeginFade|Fired when the fade has begun. {{activator|activator}}}}
* '''OnBeginFade'''
{{O Targetname}}
: Fired when the fade has begun. {{activator|activator}}
 
[[Category:GUI Entities]]

Revision as of 09:28, 7 June 2011

Template:Base point

Entity description

Env fade.png

An entity that 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.
Hold Fade (seconds) ([todo internal name (i)]) <string>
The time to hold the faded in/out state.
Fade Alpha ([todo internal name (i)]) <integer>
Alpha of the fade, where 0 = fully transparent and 255 = fully opaque.
Fade Color (R G B) ([todo internal name (i)]) <color255>
Fade color.
Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
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 : Personal
Only affect activator
  • 8 : Stay Out
The fade remains indefinitely until another fade deactivates it.

Inputs

Fade
Start the screen fade.


Outputs

OnBeginFade
Fired when the fade has begun. (!activator is the activator)