Env gunfire

From Valve Developer Community
Revision as of 23:23, 6 September 2018 by Pinsplash (talk | contribs) (forgot one last thing)
Jump to navigation Jump to search
A env_gunfire from multiple sides.

Template:Hl2 point It creates a gunfire effect which can be dynamically controlled and pointed at a target, to give the illusion of a weapon firing without an actual weapon entity being used. This is only a visual/sound effect. No damage is done.

PlacementTip.gifPlacement Tip:Valve will often use this entity for its sound effects alone. This is handy for having gunfights overheard before an encounter starts. It is not, however, used for ambient gunfire heard throughout war-torn City 17. That is done through soundscapes.
C++ In code, it is represented by theCEnvGunfireclass, defined in theeffects.cppfile.

Keyvalues

Distribution patterns. Top is an even distribution. Bottom is biased.
Target (target) ([todo internal name (i)]) <targetname>
Shoot at this target.
Min Burst Size (minburstsize) ([todo internal name (i)]) <integer>
Minimum number of rounds in a burst.
Max Burst Size (maxburstsize) ([todo internal name (i)]) <integer>
Maximum number of rounds in a burst.
Min Delay Between Bursts (minburstdelay) ([todo internal name (i)]) <float>
Minimum delay between bursts in seconds.
Max Delay Between Bursts (maxburstdelay) ([todo internal name (i)]) <float>
Maximum delay between bursts in seconds.
Rate of fire (rateoffire) ([todo internal name (i)]) <float>
Number of bullets to fire per second.
Bullet spread (spread) ([todo internal name (i)]) <integer>
Bullets may deviate this far away in degrees from shooting straight forward. Any number may be used.
Bullet distribution should be... (bias) ([todo internal name (i)]) <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.
  • 1: Evenly distributed
  • -1: Biased towards the outside
Collision detection (collisions) ([todo internal name (i)]) <choices>
Whether/how to handle bullet collision detection. If you select None, 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).
  • 0: None. Cheap performance.
  • 1: Normal collision detection.
Shoot Sound (shootsound) ([todo internal name (i)]) <string>
Gunfire sound to make. Any sound name can be inserted, either as a filepath or a soundscript name.
Literal Value Description
Weapon_AR2.NPC_Single AR2
Weapon_SMG1.NPC_Single SMG1
Tracer (tracertype) ([todo internal name (i)]) <choices>
Type of tracer to display. If not set, the default tracer will fire.
Todo: Full list of all valid tracers.
Literal value Description
AR2TRACER AR2
Start Disabled (StartDisabled) <boolean>
Stay dormant until activated (with theEnableinput).


Inputs

EnableDisable:

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


Outputs