Func 50cal: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{CDA|CFunc50Cal|CFuncTank|CBaseEntity|}}  
{{CDA|CFunc50Cal|CFuncTank|CBaseEntity|}}  
[[File:50calModel.png|350px|right]]
[[File:50calModel.png|350px|right]]
{{this is a|brush entity|name=func_50cal|game=Black Mesa}} This is {{WP|M2 Browning}} (or Browning .50 caliber machine gun) that was used by [[HECU]] soldiers during the operation on the territory of the [[Black Mesa Research Facility]]. Can be used by player and HECU soldiers. This machine gun is also used in dm_stalkyard. All outputs and flags are same as {{ent|func_tank}}, properties as well, but some have special notes. The same for inputs, but there are one unique.
{{this is a|brush entity|name=func_50cal|game=Black Mesa}} This is {{WP|M2 Browning}} (or Browning .50 caliber machine gun) that was used by [[HECU]] soldiers during the operation on the territory of the [[Black Mesa Research Facility]]. Can be used by player and HECU soldiers. This machine gun is also used in {{code|preset=1|dm_stalkyard}}. All outputs and flags are same as {{ent|func_tank}}, properties as well, but some have special notes. The same for inputs, but there are one unique.


{{note|The fire and deploy sounds are hardcoded. You still can change both in your {{bms|1}} mod by replacing the sounds with a blank sounds and playing your own sounds via input/output system.}}
{{note|The fire and deploy sounds are hardcoded. You still can change both in your {{bms|1}} mod by replacing the sounds with a blank sounds and playing your own sounds via input/output system.}}
{{note|Only certain [[NPCs]] ({{ent|npc_human_commander}}, {{ent|npc_human_grenadier}}, {{ent|npc_human_grunt}} and {{ent|npc_human_medic}}) can use this weapon via <code>FindNPCToManTank</code> input. Other will ignore this input.}}
{{note|Only certain [[NPCs]] ({{ent|npc_human_commander}}, {{ent|npc_human_grenadier}}, {{ent|npc_human_grunt}} and {{ent|npc_human_medic}}) can use this weapon via <code>FindNPCToManTank</code> input. Other will ignore this input.}}
{{note|The bullet particles is different in singleplayer and multiplayer, multiplayer particles are smaller.}}
{{note|The bullet particles is different in singleplayer and multiplayer, multiplayer particles are smaller.}}
{{note|The original model for this gun is a bit unfinished. It doesn't have mesh under it (can be noticed in dm_stalkyard and bm_c2a5a). It also uses concrete surface parametrs, instead of metal surface parametrs.}}
{{note|The original model for this gun is a bit unfinished. It doesn't have mesh under it (can be noticed in {{code|preset=1|dm_stalkyard}} and {{code|preset=1|bm_c2a5a}}). It also uses concrete surface parametrs, instead of metal surface parametrs.}}
{{bug|hidetested=1|Must be combined with model. Otherwise, game will crash when this entity will shoot.}}
{{bug|hidetested=1|Must be combined with model. Otherwise, game will crash when this entity will shoot.}}
{{bug|hidetested=1|NPC's weapon breaks after this gun usage. It doesn't removes, but becomes invisible and unable to shoot (NPC still reload weapon several times, for some reason). This breaks the AI ​​partially, because such NPC still thinks that it have functional weapon. {{not|{{bms12}}}}}}
{{bug|hidetested=1|NPC's weapon breaks after this gun usage. It doesn't removes, but becomes invisible and unable to shoot (NPC still reload weapon several times, for some reason). This breaks the AI ​​partially, because such NPC still thinks that it have functional weapon. {{not|{{bms12}}}}}}
{{bug|hidetested=1|You can find bug in dm_stalkyard when model doesn't rotates with gun position. The gun can kill controller at this moment, because it rotates 360 degrees at this moment. This seems to happen if you quickly press use button several times.
{{bug|hidetested=1|You can find bug in {{code|preset=1|dm_stalkyard}} when model doesn't rotates with gun position. The gun can kill controller at this moment, because it rotates 360 degrees at this moment. This seems to happen if you quickly press use button several times.
{{expand|title=The bug example.|
{{expand|title=The bug example.|
<br>
<br>
Line 20: Line 20:


==Keyvalues==
==Keyvalues==
{{KV Angles}}
:{{important|Value from this property affects what direction the gun treats as its default and snaps to when is not controlled (for instant, this is why the gun in the little bunker in '''bm_c2a2c''' turns to wrong angle).}}
{{KV|Effect Handling|intn=effecthandling|choices|Produce these sound and particle effects when firing.
{{KV|Effect Handling|intn=effecthandling|choices|Produce these sound and particle effects when firing.
:*0: Use Individual Settings.
:*0: Use Individual Settings.
Line 27: Line 29:


==Inputs==
==Inputs==
{{I|StopFiring|Fires when stops firing. This input probably created for debugging. Doesn't affect anything.|param=void|nofgd=1}}
{{I|StopFiring|Fires when stops firing. This input is probably created for debugging. Doesn't affect anything.|param=void|nofgd=1}}


==Dedicated [[ConVars]]==
==Dedicated [[ConVars]]==
{{varcom|start}}
{{varcom|start}}
{{varcom|sk_plr_dmg_50cal|6|arbitrary number|Player damage scale. Non-functional or deprecated.}}
{{varcom|bm_50cal_scale|1.25|[[Float]]|Model scale to set for {{ent|func_50cal}}'s parent entity.
{{varcom|sk_npc_dmg_50cal|6|arbitrary number|NPC damage scale. Non-functional or deprecated.}}
{{important|This console variable is hidden with [[Console_command_flags|"development only" flag]]. Can't be changed without using server plugins.}}
{{varcom|sk_max_50cal|0|arbitrary number|{{todo|Turn out what it does (if it does anything).}}}}
}}
{{varcom|end}}
{{varcom|end}}
{{note|All these console commands is not available in the mod version.}}


==See also==
==See also==
*[[func_tow]] - tow cannon.
*{{ent|func_tow}} - tow cannon.
*[[func_tow_mp]] - tow cannon (multiplayer version).
*{{ent|func_tow_mp}} - tow cannon (multiplayer version).
*[[env_mortar_controller]] - mortar controller.
*{{ent|env_mortar_controller}} - mortar controller.
*[[env_mortar_launcher]] - mortar launcher.
*{{ent|env_mortar_launcher}} - mortar launcher.
*[[func_tankmortar]] - combine mortar (remaining from {{hl2|4}}).
*{{ent|func_tankmortar}} - combine mortar (remaining from {{hl2|4}}).
*[[func_tank]] - main brush gun entity.
*{{ent|func_tank}} - main brush gun entity.
*[[func_tankphyscannister]] - it sets off a {{ent|physics_cannister}} within a specified trigger volume.
*{{ent|func_tankphyscannister}} - it sets off a {{ent|physics_cannister}} within a specified trigger volume.
*[[func_tankairboatgun]] - airboat gun (remaining from {{hl2|4}}).
*{{ent|func_tankairboatgun}} - airboat gun (remaining from {{hl2|4}}).
*[[func_tanklaser]] - laser cannon.
*{{ent|func_tanklaser}} - laser cannon.
*[[func_tank_combine_cannon]] - combine cannon (remaining from {{hl2|4}}).
*{{ent|func_tank_combine_cannon}} - combine cannon (remaining from {{hl2|4}}).

Latest revision as of 05:06, 22 August 2025

C++ Class hierarchy
CFunc50Cal
CFuncTank
CBaseEntity
50calModel.png

func_50cal is a brush entity available in Black Mesa Black Mesa. This is Wikipedia icon M2 Browning (or Browning .50 caliber machine gun) that was used by HECU soldiers during the operation on the territory of the Black Mesa Research Facility. Can be used by player and HECU soldiers. This machine gun is also used in dm_stalkyard. All outputs and flags are same as func_tank, properties as well, but some have special notes. The same for inputs, but there are one unique.

Note.pngNote:The fire and deploy sounds are hardcoded. You still can change both in your Black Mesa mod by replacing the sounds with a blank sounds and playing your own sounds via input/output system.
Note.pngNote:Only certain NPCs (npc_human_commander, npc_human_grenadier, npc_human_grunt and npc_human_medic) can use this weapon via FindNPCToManTank input. Other will ignore this input.
Note.pngNote:The bullet particles is different in singleplayer and multiplayer, multiplayer particles are smaller.
Note.pngNote:The original model for this gun is a bit unfinished. It doesn't have mesh under it (can be noticed in dm_stalkyard and bm_c2a5a). It also uses concrete surface parametrs, instead of metal surface parametrs.
Icon-Bug.pngBug:Must be combined with model. Otherwise, game will crash when this entity will shoot.
Icon-Bug.pngBug:NPC's weapon breaks after this gun usage. It doesn't removes, but becomes invisible and unable to shoot (NPC still reload weapon several times, for some reason). This breaks the AI ​​partially, because such NPC still thinks that it have functional weapon. (not in Black Mesa (mod))
Icon-Bug.pngBug:You can find bug in dm_stalkyard when model doesn't rotates with gun position. The gun can kill controller at this moment, because it rotates 360 degrees at this moment. This seems to happen if you quickly press use button several times.
The bug example.


Confirm:Can be fixed.

Keyvalues

Pitch Yaw Roll (Y Z X) (angles) <QAngle>
This entity's orientation in the world. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, roll is the rotation around the X axis.
Icon-Important.pngImportant:Value from this property affects what direction the gun treats as its default and snaps to when is not controlled (for instant, this is why the gun in the little bunker in bm_c2a2c turns to wrong angle).
Effect Handling (effecthandling) <choices>
Produce these sound and particle effects when firing.
  • 0: Use Individual Settings.
  • 1: AR2
    Note.pngNote:Changes the color of the fire light to blue.
  • 2: Combine Cannon
    Icon-Bug.pngBug:Shooting will cause DispatchEffect: effect "ChopperMuzzleFlash" not found on client error message in the console.

Inputs

StopFiring <void> !FGD
Fires when stops firing. This input is probably created for debugging. Doesn't affect anything.

Dedicated ConVars

Cvar/Command Parameters or default value Descriptor Effect
bm_50cal_scale 1.25 Float Model scale to set for func_50cal's parent entity.
Icon-Important.pngImportant:This console variable is hidden with "development only" flag. Can't be changed without using server plugins.

See also