Env screeneffect: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Did some quick testing in Gmod, pretty obvious effect visible. The parameter of StopEffect determines how long the fade out effect takes to fully complete. StopEffect doesn't seem to work without a parameter either, from what I saw.)
(-added class hierarchy, cleanup)
Line 1: Line 1:
{{lang|Env screeneffect}}
{{lang|Env screeneffect}}
{{base point|env_screeneffect}} It allows screenspace effects to be played on the player's view.
{{CD|CEnvScreenEffect|env_screenoverlay.cpp}}
{{entity|type=e0|env_screeneffect}} It allows screenspace effects to be played on the player's view.


{{bug|Does not function in {{tf2}}{{portal2}}.}}
{{bug|Does not function in {{tf2}}{{portal2}}.}}
{{bug|Causes a memory leak in {{l4d2}} by spamming garbage data to the console, do not use this entity for that game!}}
{{bug|Causes a memory leak in {{l4d2}} by spamming garbage data to the console, do not use this entity for that game!}}
{{code class|CEnvScreenEffect|env_screenoverlay.cpp}}


==Keyvalues==
==Keyvalues==
{{KV|Effect Type (type)|choices|Which effect to use.
{{KV Targetname}}
{{KV|Effect Type|intn=type|choices|Which effect to use.
:*0: Advisor Stun
:*0: Advisor Stun
:*1: Intro Blur
:*1: Intro Blur
:*2: Groggy Vision}}
:*2: Groggy Vision}}
{{KV BaseEntity|css=1}}


==Inputs==
==Inputs==
{{IO|StartEffect|Start the effect with the duration in seconds as the passed parameter.|param=float}}
{{IO|StartEffect|Start the effect with the duration in seconds as the passed parameter.|param=float}}
{{IO|StopEffect|Fade out the effect over the duration in seconds as the passed parameter.|param=float}}
{{IO|StopEffect|Fade out the effect over the duration in seconds as the passed parameter.|param=float}}
{{I BaseEntity}}
==Outputs==
{{O BaseEntity|l4d=1}}


[[Category:GUI Entities]]
[[Category:GUI Entities]]

Revision as of 04:21, 17 August 2023

English (en)Translate (Translate)
C++ Class hierarchy
CEnvScreenEffect
CPointEntity
CBaseEntity

Template:Entity It allows screenspace effects to be played on the player's view.

Icon-Bug.pngBug:Does not function in Team Fortress 2Portal 2.  [todo tested in ?]
Icon-Bug.pngBug:Causes a memory leak in Left 4 Dead 2 by spamming garbage data to the console, do not use this entity for that game!  [todo tested in ?]

Keyvalues

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

Effect Type (type) <choices>
Which effect to use.
  • 0: Advisor Stun
  • 1: Intro Blur
  • 2: Groggy Vision

Inputs

StartEffect <floatRedirectInput/float>
Start the effect with the duration in seconds as the passed parameter.
StopEffect <floatRedirectInput/float>
Fade out the effect over the duration in seconds as the passed parameter.