Env shooter: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
 

		
	
| m (revert) | MyGamepedia (talk | contribs)   (Should work with other games.) | ||
| (42 intermediate revisions by 27 users not shown) | |||
| Line 1: | Line 1: | ||
| {{ | {{LanguageBar}} | ||
| {{tabs|env_shooter|goldsrc=1|source=1|main=source}} | |||
| {{CD|CEnvShooter|file1=effects.cpp}} | |||
| {{this is a|point entity|name=env_shooter|sprite=1}} It shoots giblets out of its origin. These gibs can be either models or sprites. | |||
| ==  | ==Flags== | ||
| {{Fl GibshooterBase}} | |||
| {{fl|2|On fire|Creates {{ent|entityflame}} which is parented to gib. Lifetime as long as gib's. {{bug|Doesn't work with {{ent|raggib}}.|tested={{bms}}}}}} | |||
| {{fl|4|Fade out even when in player's view}} | |||
| ==  | ==Keyvalues== | ||
| *{{ | {{KV Targetname}} | ||
| *  | {{KV|Model|intn=shootmodel|studio|Thing to shoot out. Can be an [[MDL]] or a [[VMT]].}} | ||
| {{KV|Material Sound|intn=shootsounds|choices|What sounds play when the gibs are interacted with (shooting, walking on, etc). See {{ent|$surfaceprop}}. | |||
| :*<code>-1</code>: None | |||
| :*<code>0</code>: Glass | |||
| :*<code>1</code>: Wood | |||
| :*<code>2</code>: Metal | |||
| :*<code>3</code>: Flesh | |||
| :*<code>4</code>: Concrete | |||
| }} | |||
| {{KV|[[Skin]]|intn=skin|int|Some models have multiple skins. This value selects from the index, starting with 0.}} | |||
| {{KV|Model Scale|intn=scale|float|Multiplies the size of the <code>gib</code> models. Physics will not be scaled up.}} | |||
| {{KV|Gib Gravity Scale|intn=gibgravityscale|float|Scale gravity so that gibs fall faster, slower, or not at all. Only for point gibs.}} | |||
| {{KV|Mass|intn=massoverride|float|since=episodic|Force gibs to be a certain mass. Default mass is 200.{{confirm}}}} | |||
| {{Expand|title={{bms|4}} only keyvalues| | |||
| {{KV|Blood Color|intn=bloodcolor|choices|Blood color for gibs. Appears when a gib touches world geometry. Only for point gibs. | |||
| :*-1: None | |||
| :*0: Red (Human) | |||
| :*1: Yellow (Alien) | |||
| :*2: Green (Alien) | |||
| :*3: Grey (Mech) | |||
| :{{note|No difference between last three. {{ModernConfirm|Can this be fixed ?}} | |||
| }} | |||
| :{{note|This feature doesn't work with all models.}} | |||
| }} | |||
| {{KV|Explode on Impact|intn=touchkill|choices|If set to <code>Yes</code> - gib will explode when it touches world geometry. Only for point gibs. | |||
| :*0: No | |||
| :*1: Yes | |||
| }} | |||
| {{KV|Explode Damage|intn=gibdamage|float|The amount of damage the gib will do when exploding.}} | |||
| {{KV|Explode Sound|intn=gibsound|sound|Sound to play when gib exploding.}} | |||
| }} | |||
| = | {{KV GibshooterBase}} | ||
| {{KV|Disable Shadows|intn=nogibshadows|bool|Set to 1 to disable [[render target]] shadows on <code>gibs</code>.}} | |||
| {{KV RenderFields}} | |||
| {{KV SystemLevelChoice}} | |||
| ==  | ==Inputs== | ||
| {{I GibshooterBase}} | |||
| {{I RenderFields}} | |||
| == See Also == | |||
| * {{ent|env_rotorshooter}} | |||
| * {{ent|gibshooter}} | |||
Latest revision as of 02:42, 15 June 2025

 
|  Class hierarchy | 
|---|
| CEnvShooter | 
|  effects.cpp | 

env_shooter  is a   point entity  available in all  Source games. It shoots giblets out of its origin. These gibs can be either models or sprites.
 Source games. It shoots giblets out of its origin. These gibs can be either models or sprites.
Flags
- Repeatable : [1]
- On fire : [2]
- Creates entityflame which is parented to gib. Lifetime as long as gib's.  Bug:Doesn't work with raggib.  (tested in: Bug:Doesn't work with raggib.  (tested in: ) )
- Fade out even when in player's view : [4]
Keyvalues
- Name (targetname) <string>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentnameortarget).
 Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities
- Model (shootmodel) <model path>
- Thing to shoot out. Can be an MDL or a VMT.
- Material Sound (shootsounds) <choices>
- What sounds play when the gibs are interacted with (shooting, walking on, etc). See $surfaceprop.
- -1: None
- 0: Glass
- 1: Wood
- 2: Metal
- 3: Flesh
- 4: Concrete
 
- Skin (skin) <integer>
- Some models have multiple skins. This value selects from the index, starting with 0.
- Model Scale (scale) <float>
- Multiplies the size of the gibmodels. Physics will not be scaled up.
- Gib Gravity Scale (gibgravityscale) <float>
- Scale gravity so that gibs fall faster, slower, or not at all. Only for point gibs.
- Mass (massoverride)  <float> (in all games since    ) )
- Force gibs to be a certain mass. Default mass is 200.[confirm]
| 
 
 
 
 
 | 
GibShooter:
- Number of Gibs (m_iGibs) <integer>
- Total number of gibsto shoot each time the entity should shoot.
- Delay between shots (delay) <float>
- Delay (in seconds) between shooting each gib. If 0, allgibsshoot at once.
- Gib Angles (Pitch Yaw Roll) (gibangles) <vector3>
- The orientation of the spawned gibs.
- Max angular velocity (gibanglevelocity) <float>
- How fast (degrees/sec) the gibsshould spin. They will spin on the x and y axes between 10% and 100% of this speed.
- Gib Velocity (m_flVelocity) <float>
- Speed of the fired gibs.
- Course Variance (m_flVariance) <float>
- How much variance in the direction gibsare fired.
- Gib Life (m_flGibLife) <float>
- Time in seconds for gibsto live +/- 5%.
- Lighting Origin (lightingorigin) <targetname>
- Select an entity (not info_lighting!) to specify a location to sample lighting from for all gibs spawned by this shooter, instead of their own origins.
- Physics (simulation) <choices>
- How the gibswill be physically simulated.
- Disable Shadows (nogibshadows) <boolean>
- Set to 1 to disable render target shadows on gibs.
RenderFields:
- Render Mode (rendermode) <byte choices>
- Set a non-standard rendering mode on this entity.
- Render Modes 
- 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.
- Minimum / Maximum Effect Details Level (mincpulevel / maxcpulevel)  <integer choices> (in all games since  ) )
- Don't render for players with Effect Details levels that exceed the minimum or maximum.
- Choices - 0: Default ("Low" for mincpulevel, "High" formaxcpulevel)
- 1: Low
- 2: Medium
- 3: High
 
- 0: Default ("Low" for 
- Minimum / Maximum Shader Details Level (mingpulevel / maxgpulevel)  <integer choices> (in all games since  ) )
- Don't render for players with Shader Details levels that exceed the minimum or maximum.
- Choices - 0: Default ("Low" for mingpulevel, "Very High" formaxgpulevel)
- 1: Low
- 2: Medium
- 3: High
- 4: Very High
 See also: cpu_level / gpu_level convars
- 0: Default ("Low" for 
Inputs
GibShooter:
- Shoot
- Force the gibshooter to create and shoot a gib.
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 rendermodeset to a number other than0.
- Color <color255>
- Sets an RGB color for the entity.


























 Confirm:
 Confirm: