env_gunfire
Class hierarchy |
---|
CEnvGunfire |
effects.cpp
|
env_gunfire
is a point entity available in all Source games. 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.
Note:In , damage is dealt according to the specified weapon (
weaponname
). If a player is killed, the kill feed shows "Automated Sentry" as the killer with a dronegun as kill icon. The killer information for the killed player shows his own profile picture with the red text "You were killed by the Automated Sentry". Confirm:No gunshot sounds are played.
Placement 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.
Keyvalues
- Name
(targetname)
<string> - The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentname
ortarget
).
Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities
- Target
(target)
<targetname> - Shoot at this target.
- Min Burst Size
(minburstsize)
<integer> - Minimum number of rounds in a burst.
- Max Burst Size
(maxburstsize)
<integer> - Maximum number of rounds in a burst.
- Min Delay Between Bursts
(minburstdelay)
<float> - Minimum delay between bursts in seconds.
- Max Delay Between Bursts
(maxburstdelay)
<float> - Maximum delay between bursts in seconds.
- Rate of fire
(rateoffire)
<float> - Number of bullets to fire per second.
- Bullet spread
(spread)
<integer> - Bullets may deviate this far away in degrees from shooting straight forward. Any number may be used.
- Bullet distribution should be...
(bias)
<choices> - How to distribute bullets within the spread. Even distribution will shoot bullets nearly uniformly throughout the Bullet spread cone. Biased will avoid the middle and aim more along the outside of the cone.
- 1: Evenly distributed
- -1: Biased towards the outside
- Collision detection
(collisions)
<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)
<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)
<choices> - Type of tracer to display. If not set, the default tracer will fire. See List of Client Effects for all usable effects.
Literal value Description AR2TRACER AR2
- Weapon
(weaponname)
<choices> (in all games since ) - Sets all the effect settings to the ones for one gun. Confirm:Do Shoot Sound, Collision detection, and Tracer still work in CSGO?
Literal Value Description weapon_deagle Deagle weapon_elite Elites weapon_fiveseven FiveSeven weapon_glock Glock weapon_p228 p228 weapon_usp USP weapon_ak47 AK47 weapon_aug Aug weapon_awp AWP weapon_famas Famas weapon_g3sg1 g3sg1 weapon_galil Galil weapon_m249 M249 weapon_m4a1 m4a4 weapon_mac10 Mac10 weapon_p90 P90 weapon_ump45 Ump45 weapon_xm1014 XM1014 weapon_bizon Bizon weapon_mag7 Mag7 weapon_negev Negev weapon_sawedoff Sawedoff weapon_tec9 Tec9 weapon_mp7 Mp7 weapon_mp9 Mp9 weapon_nova Nova weapon_p250 p250 weapon_scar20 Scar20 weapon_sg556 sg556 weapon_ssg08 ssg08 weapon_usp_silencer USP weapon_m4a1_silencer M4A1 Silencer
- Start Disabled
(StartDisabled)
<boolean> - Stay dormant until activated (with the
Enable
input).
Inputs
EnableDisable:
Enable / Disable
- Enable/disable this entity from performing its task. It might also disappear from view.