This article's documentation is for anything that uses the Source engine. Click here for more information.

Env sprite oriented: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Robot: fixing template case.)
(This entity was present since Orange Box (Source 2007).)
 
(27 intermediate revisions by 11 users not shown)
Line 1: Line 1:
{{wrongtitle|title=env_sprite_oriented}}
{{LanguageBar}}
{{base_point|env_sprite_oriented}}
{{CD|CSpriteOriented|file1=Sprite.cpp}}
{{screenshot}}
{{this is a|point entity|name=env_sprite_oriented|since=Source 2007}} It is also available in {{bms|4}} and {{mapbase|4}}. It works like {{ent|env_sprite}} but is forced to stay in one direction instead of always turning to face the player. The [[sprite]] material needs to use {{ent|$spriteorientation}}.


== Entity description ==
{{note|The only [[render modes]] that render sprite transparency are ''Glow'', ''Additive'', ''Additive Fractional Frame'', ''World Space Glow'' and ''Alpha Add'' {{not in FGD}}.}}
A [[env_sprite]] that allows orientation.
* {{todo|This appears to be exactly the same as [[env_sprite]] except for the addition of the [[angles]] keyvalue which probably modifies or overrides the env_sprite behaviour vis: "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]], [[env_steam]], and [[env_lightglow]].
{{OtherKIO|env_sprite|All}}


== Keyvalues ==
==See also==
* {{kv angles}}
*{{ent|env_sprite}}
 
*{{ent|env_sprite_clientside}}
*; framerate <string>
*{{ent|env_lightglow}}
: Rate at which the sprite should animate, if at all.
*{{ent|env_lensflare}}
: Default value is 10.0 fps.
 
*; model <sprite_name>
: <sprite_name> is the Material of the sprite to be drawn.
: Default is "<code>sprites/glow01.spr</code>".
{{warning|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 <string>
: Scale multiplier of the sprite.
{{warning|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.0</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.
: Default value is 2.0.
 
*; HDRColorScale <float> 
: Float value to multiply sprite color by when running in HDR mode. Default is 1.0.
 
* {{kv dxlevelchoice}}
* {{kv renderfields}}
{{warning|The only [[Render Modes|render modes]] that render sprite transparency are ''Glow'', ''Additive'', ''Additive Fractional Frame'' and ''World Space Glow''.}}
* {{kv parentname}}
* {{kv targetname}}
 
== Flags ==
* 1 : Start on
* 2 : Play Once
 
== Inputs ==
*; SetScale <float>
: Set the scale (0 - 8.0).
*; 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.
*; ColorRedValue <float>
: Change red color channel's value (0-255)
*; ColorGreenValue <float>
: Change green color channel's value (0-255)
*; ColorBlueValue <float>
: Change blue color channel's value (0-255)
* {{I Parentname}}
* {{I RenderFields}}
* {{i targetname}}
 
== Outputs ==
* {{o targetname}}

Latest revision as of 06:23, 22 March 2025

English (en)Translate (Translate)
C++ Class hierarchy
CSpriteOriented
CSprite
CBaseEntity
C++ Sprite.cpp
Nuvola apps ksnapshot.png
This article or section needs a screenshot to help visually convey the subject.
You can upload screenshots at Special:Upload. For help, see Help:Images.

env_sprite_oriented is a point entity available in all Source Source games since Source 2007 Source 2007. It is also available in Black Mesa Black Mesa and Mapbase Mapbase. It works like env_sprite but is forced to stay in one direction instead of always turning to face the player. The sprite material needs to use $spriteorientation.

Note.pngNote:The only render modes that render sprite transparency are Glow, Additive, Additive Fractional Frame, World Space Glow and Alpha Add !FGD.
Note.pngNote:All Keyvalues / Inputs / Outputs are same as env_sprite.

See also