prop_mounted_machine_gun

From Valve Developer Community
Jump to navigation Jump to search
English (en)中文 (zh)Translate (Translate)
Class hierarchy
CPropMountedGun
CBaseMountedWeapon
CDynamicProp
CBreakableProp
CBaseProp
CBaseAnimating
CBaseEntity

prop_mounted_machine_gun is a point entity available in Left 4 Dead series Left 4 Dead series. It is a usable .50 caliber mounted gun.

Icon-Bug.pngBug:In Left 4 Dead toggling the flashlight will cause toggle noise to repeat until you stop using the mounted gun.
Note.pngNote:In Left 4 Dead 2 the classname is fixed-up to prop_minigun when it spawns (you can see this by using ent_text command for example)
Note.pngNote:Louis spawned from info_l4d1_survivor_spawn will use this if accessible by nav. If you for some reason do not want Louis to use it, use the obsolete prop_minigun leftover.
Which, despite the name, is the same 50Cal gun. But louis is not coded to use that entity.

Left 4 Dead Left 4 Dead Overheats after 20 seconds, needing 20 seconds to cool down. 40 seconds if players won't let go.
Left 4 Dead 2 Left 4 Dead 2 Overheats after 15 seconds, needing 60 seconds to cool down 120 seconds if players won't let go.

Heavy machine gun.png

Keyvalues

Max yaw (MaxYaw) <float>
Max yaw the gun can be turned.
Max pitch (MaxPitch) <float>
Max pitch the gun can be depressed.
Min pitch (MinPitch) <float>
Min pitch the gun can be raised.

Outputs

OnFireStart
Fired when the minigun has spun up and is starting firing.
OnFireStop
Fired when the minigun has stopped firing.

ConVars

The following Cvars are related to the machinegun, which can change how it functions.
These should not be modified because players are used to the default, but if an extra challenge like longer cooldown is required, it would be possible to do so.

Cvar/CommandParameters or default valueDescriptorEffect
mounted_gun_fire_think_interval Left 4 Dead
z_mounted_gun_fire_think_interval Left 4 Dead 2
0.05seconds
mounted_gun_cooldown_time20 Left 4 Dead
60 Left 4 Dead 2
secondsMounted gun cooldown time
mounted_gun_mount_cooldown_time0.5<float>Time modifier for cooldown duration if players won't let go of gun. 0.5 means cooldown speed is halved, so it takes 40, or 120 seconds for the gun to cool down fully.
Think of it the same way host_timescale 0.5 would work, but applied only to the cooldown timer if players refuse to let go of it.
mounted_gun_overheat_penalty_time20 Left 4 Dead
60 Left 4 Dead 2
seconds
mounted_gun_overheat_time20 Left 4 Dead
15 Left 4 Dead 2
secondsMounted gun overheat time
mounted_gun_rate_of_fire8<integer>Rounds per second.

Following cvars are Left 4 Dead Left 4 Dead only

Cvar/CommandParameters or default valueDescriptorEffect
mounted_gun_damage50
mounted_gun_distance36.0

See also