env_shooter

From Valve Developer Community

Revision as of 03:09, 20 January 2009 by VDCBot (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This is a point entity available in all Source games.

Contents

Entity description

An entity that shoots gibs out of its origin. These gibs can be either models or sprites.

Availability

This point-based entity is available in: all Source games. In code it is represented by class CEnvShooter, defined in effects.cpp.

Keyvalues

  • Targetname:

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

Parent <targetname>
Specifies the targetname of this entity's movement parent. Entities with parents move with their parent.
  • angles
<angles> Gib Direction (Pitch Yaw Roll) - The direction the gibs will fly.
  • m_iGibs
<integer> Number of Gibs - Total number of gibs to shoot each time it's activated.
  • delay
<float> Delay between shots - Delay (in seconds) between shooting each gib. If 0, all gibs shoot at once.
  • gibangles
<angles> Gib Angles (Pitch Yaw Roll) - The orientation of the spawned gibs.
  • m_flVelocity
<float> Gib Velocity - Speed of the fired gibs.
  • m_flVariance
<float> Course Variance - How much variance in the direction gibs are fired.
  • m_flGibLife
<float> Gib Life - Time in seconds for gibs to live +/- 5%.
  • lightingorigin
<target_destination> Select an info_lighting to specify a location to sample lighting from for all gibs spawned by this shooter, instead of their own origins.
  • 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.
  • disablereceiveshadows
<boolean> Disable Receiving Shadows
  • shootmodel
<studio> Model - Thing to shoot out. Can be a .mdl (model) or a .vmt (material/sprite).
  • shootsounds
<choices> Material Sound
Literal value Description
-1 None
0 Glass
1 Wood
2 Metal
3 Flesh
4 Concrete
  • simulation
<choices> Simulate
Literal value Description
0 Point
1 Physics
2 Ragdoll
  • skin
<integer> Gib Skin - Some models have multiple versions of their textures, called skins. Set this to a number other than 0 to use that skin on all gibs produced by this shooter.
  • gibanglevelocity
<angle> Max angular velocity
How fast (degrees/sec) the gib pieces should spin. They will spin on x and y axis at between 10% and 100% of this speed.
  • lightingorigin
<target_destination> Select an info_lighting to specify a location to sample lighting from for all gibs spawned by this shooter, instead of their own origins.
  • nogibshadows
<boolean> If set, shadows from gibs are disabled
  • gibgravityscale
<float> Gib gravity scale. This field allows you to scale gravity so that gibs fall faster, slower, or not at all.
Note:This functionality only works for point-based gibs.

Flags

  • 1 : Repeatable
  • 2 : On fire
  • 4 : strict remove after lifetime

Inputs

  • 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.
  • 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.
  • Shoot
Force the gibshooter to create and shoot a gib.

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