env_sprite

From Valve Developer Community

Revision as of 23:17, 16 September 2009 by BlueRaja (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

env_sprite is a point entity available in all Source games. 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:The only render modes that render sprite transparency are Glow, Additive, Additive Fractional Frame and World Space Glow.
Bug:When choosing a sprite from the sprite browser, the name it provides does not contain the required .spr/.vmt 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.

See also

Keyvalues

Framerate <string>
Rate at which the sprite should animate, if at all.
Sprite Name <string>
The material to draw.
Scale <float>
Scale multiplier of the sprite.
Bug:Hammer's default sprite scale 0.25, but the engine's is 1.0. To synchronise the values, set this keyvalue to something.
Size of Glow Proxy Geometry <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 pokes through nearby geometry the glow will be rendered.
HDR color scale <float>
Float value to multiply sprite color by when running with HDR.

DXLevelChoice:

Minimum DX Level <choices>
Maximum DX Level <choices>
The entity will not exist if the engine is running outside the given range of DirectX Versions. Don't use this with anything that will break saved games should a player switch dxlevel!
  • Default (no bounding)
  • DX7
  • DX8
  • DX8.1
  • DX9 SM2
  • DX9 SM3

RenderFields:

Render Mode <choices>
Set a non-standard rendering mode on this entity. See Render Modes for details.
FX Amount (0 - 255) <int>
Intensity of the selected render mode.
FX Color (R G B) <color255>
Color used by the selected render mode (if applicable).
Disable Receiving Shadows <bool>
Prevents the entity from receiving shadows. To do: RTT and/or shadow map?

RenderFXChoices:

Render FX <choices>
Several GoldSrc-era visibility modes which change the way the entity is rendered, typically by fading it in and out.

Parentname:

Parent <targetname>
Specifies the targetname of this entity's movement parent. Entities with parents move with their parent.

Targetname:

Name <string>
The targetname other entities refer to this entity by.

Flags

  • Start on
  • Play Once

Inputs

SetScale <float>
Set the scale (0 - 8.0).
HideSprite
ShowSprite
ToggleSprite
Whether to draw the sprite.
ColorRedValue <float> (New with Orange Box)
ColorGreenValue <float> (New with Orange Box)
ColorBlueValue <float> (New with Orange Box)
Change the intensity of the sprite's three color channels (0-255).

Parentname:

SetParent <targetname>
Move with this entity. See Entity Hierarchy (parenting).
SetParentAttachment <string>
Attach to a named attachment on the current parent. The entity will teleport so that the position of its root bone matches that of the attachment.
SetParentAttachmentMaintainOffset <string>
As above, but without teleporting. The entity retains its position relative to the attachment at the time of the input being received.
ClearParent
Removes this entity from its current movement hierarchy.

RenderFields:

Color <color255>
Set the rendercolor.
Alpha <byte>
Set the renderamt.

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.

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.
Personal tools