env_gunfire

From Valve Developer Community

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


Contents

Entity Description

Fires a tracer with customization

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.
  • EnableDisable:

Start Disabled <bool>
Stay dormant until activated (probably with the Enable input).
  • target
<target_destination> Shoot at this target. REMEMBER - this is an effect only! It does not do damage!
  • minburstsize
<integer> Minimum number of rounds in a burst.
  • maxburstsize
<integer> Maximum number of rounds in a burst.
  • minburstdelay
<float> Minimum delay between bursts. (seconds)
  • maxburstdelay
<float> Maximum delay between bursts. (seconds)
  • rateoffire
<float> Expressed as rounds per second
  • spread
<integer> The 'cone of inaccuracy' of the shots fired by this entity. Expressed as degrees
  • bias
<choices> How to distribute bullets within the spread. Even distribution is a true scatter throughout the spread. Biased towards the outside makes the shots 'miss' the target by tending towards the outside of the spread.
Literal Value Description
1 Evenly distributed
-1 Biased towards the outside
  • collisions
<boolean> Whether or not to handle bullet collision detection.
Note:If not set, this entity will be very cheap to use, but all bullets will stop short at their target's position in space and there will be no impact effects. Normal collision detection does the same things NPCs do when they fire their guns (except harm anything).
  • shootsound
<string/choices> Gunfire sound to make
Literal Value Description
Weapon_AR2.NPC_Single AR2
Weapon_SMG1.NPC_Single SMG1
  • tracertype
<choices> Type of tracer to display
If not set, the default tracer will fire
Literal value Description
AR2TRACER AR2

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.
  • EnableDisable:

Enable
Disable
Enable/disable this entity from performing its task. It might also disappear from view.

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