Env fade: Difference between revisions
Jump to navigation
Jump to search
Thunder4ik (talk | contribs) m (→Flags: clean up, replaced: {{ModernTodo| → {{todo|) |
m (Updated old entity format to {{this is a}}. This action was perfomed by a bot.) |
||
Line 1: | Line 1: | ||
{{lang | <!-- When this page is updated to {{langsp}} or {{language subpage}} instead of {{lang}}, please move {{this is a}} to the base page, as it is automatically translated. -->{{lang}}{{infotable | ||
{{infotable | |||
|env_fade | |env_fade | ||
|img=[[File:env_fade.png]] | |img=[[File:env_fade.png]] | ||
Line 8: | Line 7: | ||
}} | }} | ||
{{CD|CEnvFade|file1=EnvFade.cpp}} | {{CD|CEnvFade|file1=EnvFade.cpp}} | ||
{{ | {{this is a|e0|name=env_fade}} It controls screen fades to or from a solid color. Add '''Duration''' and '''Hold Time''' together for the total time this entity will be in effect. | ||
==Keyvalues== | ==Keyvalues== | ||
Line 20: | Line 19: | ||
{{fl|1|Fade From|Screen fades ''from'' the specified color instead of ''to'' it.}} | {{fl|1|Fade From|Screen fades ''from'' the specified color instead of ''to'' it.}} | ||
{{fl|2|Modulate|Uses attenuation blending to achieve the fade. The normal fade does a straight weighted blend between the screen and the fading color. Modulate actually attenuates the RGB channels. For example, a color of <code>0 255 0</code> would mute the red and blue channels and create a green nightvision-type effect.}} | {{fl|2|Modulate|Uses attenuation blending to achieve the fade. The normal fade does a straight weighted blend between the screen and the fading color. Modulate actually attenuates the RGB channels. For example, a color of <code>0 255 0</code> would mute the red and blue channels and create a green nightvision-type effect.}} | ||
{{fl|4|nofgd=1|Triggering player only| Only affects the screen of the {{ent|!activator}}. <code>!activator</code> is probably the easiest to reach through a [[trigger]] entity. If not checked, the fade will apply to all players.{{ModernBug|{{tf2}}<code>Fade From</code> and <code>Triggering player only</code> combined do not work. Fade effects with this flag cannot be faded ''from'' for only the {{ent|!activator}}. | {{fl|4|nofgd=1|Triggering player only| Only affects the screen of the {{ent|!activator}}. <code>!activator</code> is probably the easiest to reach through a [[trigger]] entity. If not checked, the fade will apply to all players.{{ModernBug|{{tf2}}<code>Fade From</code> and <code>Triggering player only</code> combined do not work. Fade effects with this flag cannot be faded ''from'' for only the {{ent|!activator}}.}} | ||
:{{todo|Test in other games}} | :{{todo|Test in other games}} | ||
{{fl|8|Stay Out|Fade remains indefinitely until another fade deactivates it.}} | {{fl|8|Stay Out|Fade remains indefinitely until another fade deactivates it.}} |
Revision as of 10:12, 4 January 2024
env_fade | |
---|---|
![]() | |
Type | Point entity |
Engine | ![]() |
Availability | In all games |
![]() |
---|
CEnvFade |
![]() |
env_fade
is an e0 available in all Source games. It controls screen fades to or from a solid color. Add Duration and Hold Time together for the total time this entity will be in effect.
Keyvalues
- Duration (seconds) (duration) <string>
- The time that it will take to fade the screen in or out.
- Hold Fade (seconds) (holdtime) <string>
- The time to hold the faded in/out state.
- Fade Alpha (renderamt) <integer>
- Alpha of the fade, where 0 = fully transparent and 255 = fully opaque.
- Fade Color (R G B) (rendercolor) <color255>
- Fade color.
- Reverse Fade Duration (seconds) (ReverseFadeDuration) <float> (in all games since
)
- The duration of the reverse fade.
Flags
- Fade From : [1]
- Screen fades from the specified color instead of to it.
- Modulate : [2]
- Uses attenuation blending to achieve the fade. The normal fade does a straight weighted blend between the screen and the fading color. Modulate actually attenuates the RGB channels. For example, a color of
0 255 0
would mute the red and blue channels and create a green nightvision-type effect.
{{fl|4|nofgd=1|Triggering player only| Only affects the screen of the !activator. !activator
is probably the easiest to reach through a trigger entity. If not checked, the fade will apply to all players.Template:ModernBug
- Todo: Test in other games
- Stay Out : [8]
- Fade remains indefinitely until another fade deactivates it.
Inputs
- Fade
- Start the screen fade.
- FadeReverse (in all games since
)
- Begin doing the reverse of the current fade.
- Alpha !FGD
- Changes Fade Alpha.
- Color !FGD
- Changes Fade Color.
Outputs
- OnBeginFade
- Fired when the fade has begun.
ConCommands
Cvar/Command | Parameters or default value | Descriptor | Effect |
---|---|---|---|
fadein | float int int int int | Time (seconds), Red, Green, Blue, Alpha | Makes the screen black (or the specified color), then fades to the normal view. |
fadeout | float int int int int | Time (seconds), Red, Green, Blue, Alpha | Fades the screen to black (or the specified color). |