Env sprite: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Robot: fixing template case.)
No edit summary
Line 1: Line 1:
{{wrongtitle|title=env_sprite}}
{{base_point|env_sprite}} It creates a [[sprite]] in the world. Sprites always face the player, unless they are restricted to rotating on certain axes as specified in the [[VTF]] compile parameters (in which case you should be using [[env_sprite_oriented]]). __NOTOC__
{{base_point|env_sprite}}


== Entity description ==
{{note|The only [[Render Modes|render modes]] that render sprite transparency are ''Glow'', ''Additive'', ''Additive Fractional Frame'' and ''World Space Glow''.}}
Creates a sprite in the world. Sprites always face the player, unless they are restricted to rotating on certain axes as specified in the [[VTF]] compile parameters. This entity should be treated as an "override" for certain sprite effects, as more specific controls already exist for [[env_fire|fire]], [[env_steam|steam]], or [[env_lightglow|light glows]].


The only [[Render Modes|render modes]] that render sprite transparency are ''Glow'', ''Additive'', ''Additive Fractional Frame'' and ''World Space Glow''.
== See also ==


* See also [[env_sprite_oriented]].
* [[env_sprite_oriented]]
* [[env_fire]]
* [[env_steam]]
* [[env_lightglow]]


{{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 env_sprite}}
* {{KV Targetname}}
* {{KV Parentname}}
* {{KV RenderFields}}
* {{KV DXLevelChoice}}
* {{KV HDRColorScale}}
* '''framerate'''
: <float> Rate at which the sprite should animate, if at all.
* '''model'''
: <sprite> Material of the sprite to be drawn.
{{note|When choosing a sprite from the sprite browser, the name it provides does not contain the required <code>.spr</code>/<code>.vmt</code> file extension. While the sprite preview can find the sprite, the extension needs to be typed in by hand for the engine to be able to find the sprite in-game.}}
* '''scale'''
: <float> Scale multiplier of the sprite.
{{note|The sprite preview doesn't display sprites at the right scale. The sprite preview scale is preset to <code>0.25</code>, while sprite scale in-game is preset to <code>1</code>. To correct the preview scale, set this keyvalue (to any value).}}
* '''GlowProxySize'''
: <float> Size of the glow to be rendered for visibility testing. Must be larger than the distance from the sprite center to empty space.  So if this glow is inside geometry (like a light bulb), set this value to be bigger than the bulb's radius. Any time a sphere of this radius would be visible (poking through any nearby geometry), the glow will be rendered.


== Flags ==
== Flags ==
* 1 : Start on
 
* 2 : Play Once
{{Fl env_sprite}}


== Inputs ==
== Inputs ==
* {{I Targetname}}
 
* {{I RenderFields}}
{{I env_sprite}}
* {{I Parentname}}
* '''SetScale <float>'''
: Set the scale.
* '''HideSprite'''
: Hide the sprite. Won't be drawn until the 'ShowSprite' input is received.
* '''ShowSprite'''
: Show the sprite.
* '''ToggleSprite'''
: Toggle the sprite between hidden and shown.
* '''{{EP2 add|ColorRedValue}}'''
: Change red coloration
* '''{{EP2 add|ColorGreenValue}}'''
: Change green coloration
* '''{{EP2 add|ColorBlueValue}}'''
: Change blue coloration


== Outputs ==
== Outputs ==
* {{O Targetname}}
 
{{O Targetname}}

Revision as of 02:35, 24 July 2009

Template:Base point It creates a sprite in the world. Sprites always face the player, unless they are restricted to rotating on certain axes as specified in the VTF compile parameters (in which case you should be using env_sprite_oriented).

Note.pngNote:The only render modes that render sprite transparency are Glow, Additive, Additive Fractional Frame and World Space Glow.

See also

Keyvalues

Template:KV env sprite

Flags

Template:Fl env sprite

Inputs

Template:I env sprite

Outputs