Prop mounted machine gun: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
<!-- When this page is updated to {{langsp}} or {{langsp}} instead of {{lang}}, please move {{this is a}} to the base page, as it is automatically translated. -->{{lang|Prop mounted machine gun}}{{CD|CPropMountedGun}}
{{LanguageBar}}
{{this is a|point entity|name=prop_mounted_machine_gun|series=Left 4 Dead}} It is a usable .50 caliber mounted gun.
{{CD|CPropMountedGun}}
{{This is a|point entity|name=prop_mounted_machine_gun|series=Left 4 Dead}} It is a usable .50 caliber mounted gun.
{{Bug|{{l4d}} Toggling the flashlight will cause toggle noise to repeat until you stop using the mounted gun.}}
{{Bug|{{l4d}} Toggling the flashlight will cause toggle noise to repeat until you stop using the mounted gun.}}
{{ModernConfusion|{{l4d2}} Entity classname in-game is prop_minigun. While the actual minigun is [[prop_minigun_l4d1]].}}
{{Note|In {{l4d2}} the classname is fixed-up to <code>prop_minigun</code> when it spawns (you can see this by using {{cmd|ent_text}} command for example) }}
{{ModernImportant|Using this entity is required if you want Louis spawned from [[Info l4d1 survivor spawn]] to use mounted gun}}
{{Note|Louis spawned from {{ent|info_l4d1_survivor_spawn}} will use this if accessible by nav}}
 
{{l4d|4}} Overheats after 20 seconds, needing 20 seconds to cool down.<br>
{{l4d|4}} Overheats after 20 seconds, needing 20 seconds to cool down.<br>
{{l4d2|4}} Overheats after 15 seconds, needing 60 seconds to cool down.
{{l4d2|4}} Overheats after 15 seconds, needing 60 seconds to cool down.

Revision as of 16:47, 16 September 2024

English (en)中文 (zh)Translate (Translate)
C++ Class hierarchy
CPropMountedGun
CBaseMountedWeapon
CDynamicProp
CBreakableProp
CBaseProp
CBaseAnimating
CBaseEntity

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

Icon-Bug.pngBug:Left 4 Dead Toggling the flashlight will cause toggle noise to repeat until you stop using the mounted gun.  [todo tested in ?]
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

Left 4 Dead Left 4 Dead Overheats after 20 seconds, needing 20 seconds to cool down.
Left 4 Dead 2 Left 4 Dead 2 Overheats after 15 seconds, needing 60 seconds to cool down.

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/Command Parameters or default value Descriptor Effect
mounted_gun_fire_think_interval (in Left 4 Dead 2 Left 4 Dead 2 has additional z_ prefix) 0.05 seconds
mounted_gun_cooldown_time Left 4 Dead Left 4 Dead 20
Left 4 Dead 2 Left 4 Dead 2 60
seconds Mounted gun cooldown time
mounted_gun_mount_cooldown_time 0.5
mounted_gun_overheat_penalty_time Left 4 Dead Left 4 Dead 20
Left 4 Dead 2 Left 4 Dead 2 60
seconds
mounted_gun_overheat_time Left 4 Dead Left 4 Dead 20
Left 4 Dead 2 Left 4 Dead 2 15
seconds Mounted gun overheat time
mounted_gun_rate_of_fire 8

Following cvars are Left 4 Dead Left 4 Dead only

Cvar/Command Parameters or default value Descriptor Effect
mounted_gun_damage 50
mounted_gun_distance 36.0

See also