Env fade: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
m (revert)
Line 1: Line 1:
baserc
{{wrongtitle|title=env_fade}}
{{wrongtitle|title=env_fade}}
==Entity Description==
 
== Entity description ==
[[Image:{{PAGENAME}}.png|left]]An entity that controls screen fades.  Add '''duration''' and '''holdtime''' together for the total time this entity will be in effect.
[[Image:{{PAGENAME}}.png|left]]An entity that controls screen fades.  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 fade's 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 nightvision anyway. The fade color for that would be pure green with modulate.{{clr}}
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==
== Keyvalues ==
* {{kv targetname}}
* {{kv targetname}}
* '''duration'''
* '''duration'''
Line 17: Line 17:
: {{color}} Fade Color
: {{color}} Fade Color


==Flags==
== Flags ==
* 1 : Fade From
* 1 : Fade From
:Essentially a "fade in," where the screen begins from an opaque color.
:Essentially a "fade in," where the screen begins from an opaque color.
Line 27: Line 27:
:The fade remains indefinitely until another fade deactivates it.
:The fade remains indefinitely until another fade deactivates it.


==Inputs==
== Inputs ==
* {{i targetname}}
* {{i targetname}}
* {{i renderfields}}
* {{i renderfields}}
Line 33: Line 33:
: Start the screen fade.
: Start the screen fade.


==Outputs==
== Outputs ==
* {{o targetname}}
* {{o targetname}}
* '''OnBeginFade'''
* '''OnBeginFade'''

Revision as of 01:47, 11 October 2007

Template:Wrongtitle

Entity description

Env fade.png

An entity that controls screen fades. 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

<integer> The time that it will take to fade the screen in or out.
  • holdtime
<integer> The time to hold the faded in/out state.
  • renderamt
<byte> Alpha of the fade, where 0 = fully transparent and 255 = fully opaque.
  • rendercolor
#000000 Fade Color

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

Start the screen fade.

Outputs

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