env_fade

From Valve Developer Community

Jump to: navigation, search

This is a point entity available in all Source games.

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

  • Targetname:

Name <string>
The targetname other entities refer to this entity by.
  • 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

  • Targetname:

Kill
Removes this entity from the world.
KillHierarchy
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 means infinite>
FireUser1 to FireUser4
Fire the OnUser outputs; see User Inputs and Outputs.
  • RenderFields:

Color <color255>
Set the rendercolor.
Alpha <byte>
Set the renderamt.
  • Fade
Start the screen fade.

Outputs

  • Targetname:

OnUser1 to OnUser4
Fired in response to the FireUser inputs; see User Inputs and Outputs.
OnKilled (New with Left 4 Dead)
Fired when the entity is killed and removed from the game.
  • OnBeginFade
Fired when the fade has begun. (activator is the activator)
Personal tools