Env spritetrail: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(→‎Keyvalues: fixed the TODO on Render Mode and added a link)
(updates)
Line 1: Line 1:
{{base_point|env_spritetrail}}  
{{lang|Env spritetrail}}
{{base point|env_spritetrail}} It frequently emits a [[sprite]], intended to create a trail effect when moving.


==Entity description==
{{code class|CSpriteTrail|SpriteTrail.cpp}}
The Hammer Entity Help section describes this entity as "a magical trail" you can parent to anything. In other words, it is a trail effect for parenting with other entities.
{{note|When you pick a sprite to use, eg <code>sprites/light_glow01</code> you must add the <code>.vmt</code> extension or else it won't display ingame.}}


== Keyvalues ==
==Keyvalues==
{{KV|Lifetime|float|How long the beam is shown.}}
{{KV|Lifetime (lifetime)|float|How long the beam is shown.}}
{{KV|Start Width|float|The width of the beam to the beginning.}}
{{KV|Start Width (startwidth)|float|The width of the beam to the beginning.}}
{{KV|End Width|float|The width of the beam when it has full expanded.}}
{{KV|End Width (endwidth)|float|The width of the beam when it has full expanded.}}
{{KV|Sprite Name|string|The material to draw.}}
{{KV|Sprite Name (spritename)|string|The material to draw.}}
{{KV|FX Amount (0 - 255)|integer|The FX amount is used by the selected Render Mode.}}
{{KV|Animated (animate)|nofgd=1|bool|{{todo|Untested. Tells the sprite to animate if it can. All the keyvalues, flags, and inputs from {{ent|env_sprite}} may be used.}}}}
{{KV|FX Color (R G B)|color255|The FX color is used by the selected Render Mode.}}
{{KV RenderFields}}
{{KV|[[Render Mode]]|choices|
{{KV BaseEntity}}
:* 0 : Normal
:* 4 : Solid
:* 5 : Additive}}
{{KV Parentname}}
{{KV Targetname}}


== Inputs ==
==Inputs==
{{I Parentname}}
{{I RenderFields}}
{{I Targetname}}
{{I BaseEntity}}


== Outputs ==
==Outputs==
{{O Targetname}}
{{O BaseEntity|l4d=1}}

Revision as of 15:57, 2 October 2018

English (en)Translate (Translate)

Template:Base point It frequently emits a sprite, intended to create a trail effect when moving.

C++ In code, it is represented by theCSpriteTrailclass, defined in theSpriteTrail.cppfile.

Keyvalues

Lifetime (lifetime) ([todo internal name (i)]) <float>
How long the beam is shown.
Start Width (startwidth) ([todo internal name (i)]) <float>
The width of the beam to the beginning.
End Width (endwidth) ([todo internal name (i)]) <float>
The width of the beam when it has full expanded.
Sprite Name (spritename) ([todo internal name (i)]) <string>
The material to draw.
Animated (animate) ([todo internal name (i)]) <boolean> !FGD
Todo: Untested. Tells the sprite to animate if it can. All the keyvalues, flags, and inputs from env_sprite may be used.

RenderFields:


Render Mode (rendermode) <byte choices>
Set a non-standard rendering mode on this entity.
Render Modes
  • 0: Normal
  • 1: Color
  • 2: Texture
  • 3: Glow
  • 4: Solid/Alphatest Obsolete
  • 5: Additive
  • 6: Removed, does nothing Obsolete
  • 7: Additive Fractional Frame
  • 8: Alpha Add
  • 9: World Space Glow
  • 10: Don't Render
Render FX (renderfx) <byte choices>
Various somewhat legacy alpha effects. See render effects.
Render Amount / Transparency (renderamt) <byte>
Transparency amount, requires a Render Mode other than Normal. 0 is invisible, 255 is fully visible.
Render Color (R G B) (rendercolor) <color255>
Color tint.


Inputs

RenderFields:

Alpha <integer 0–255>
Sets the entity's transparency to a number from 0 (invisible) to 255 (fully visible). Requires the entity to have its rendermode set to a number other than 0.
Color <color255RedirectInput/color32>
Sets an RGB color for the entity.


Outputs