Env fade

From Valve Developer Community

This point-based entity is available in all Source games.

Table of contents

Entity description

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

Defines the name that other entities refer to this entity by.
  • hammerid [New with Orange Box]
<integer readonly> This id is used for debugging purposes in Hammer.
  • duration
<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
<color255> 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

  • Kill
Removes this entity from the world.
Removes this entity and all its children from the world.
  • AddOutput <string>
Evaluates a keyvalue/output on this entity. It can be potentially very dangerous, use with care.
Format: <key> <value>
Format: <output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire (-1 == infinite)>
Causes this entity's OnUser1-4 outputs to be fired. See User Inputs and Outputs.
Set the rendercolor.
Set the renderamt.
  • Fade
Start the screen fade.

Outputs

Fired in response to FireUser1-4 inputs. See User Inputs and Outputs.
!activator = activator
  • OnBeginFade
Fired when the fade has begun.
!activator = activator