weapon_smg1

From Valve Developer Community
Revision as of 00:50, 8 April 2025 by Breakin' Benny (talk | contribs) (The template only supports up to 6 games (where "game=" is the firstest position in the index))
Jump to navigation Jump to search
English (en)Translate (Translate)
W smg1.PNG
C++ Class hierarchy
CWeaponSMG1
CHLSelectFireMachineGun
CHLMachineGun
CBaseHLCombatWeapon
CBaseCombatWeapon
CBaseAnimating
CBaseEntity
C++ weapon_smg1.cpp

weapon_smg1 is a point entity available in Half-Life 2 Half-Life 2, Half-Life 2: Episode One Half-Life 2: Episode One, Half-Life 2: Episode Two Half-Life 2: Episode Two, Half-Life 2: Deathmatch Half-Life 2: Deathmatch, Half-Life 2: Lost Coast Half-Life 2: Lost Coast, and The Beginner's Guide The Beginner's Guide.

Warning.pngWarning:
  • The {{{game5}}} parameter is inconsistent with the name defined by the {{tbg}} template. This can most likely be fixed by setting the value of the {{{game5}}} parameter to The Beginner's Guide.
    If a parameter is consistent but you're still seeing this warning, it may be an issue with the template itself. Please discuss it on the template's talk page.

An automatic machine gun based off the Wikipedia icon MP7. When first picked up, the player is given 90 bullets. Up to 270 bullets and three alt-fire grenades can be carried (including 45 loaded into the weapon). A box of bullets can be placed with item_ammo_smg1 or item_ammo_smg1_large, while grenades can be placed with item_ammo_smg1_grenade.

Before it is picked up, the gun also follows all physics rules as if it were a prop_physics.

Placement guide

Stub

This article or section is a stub. You can help by expanding it.

Half-Life 2 Half-Life 2/Half-Life 2: Episode One Half-Life 2: Episode One/Half-Life 2: Episode Two Half-Life 2: Episode Two:

In the main Half-Life 2 series, this weapon is usually best utilized in close to medium ranged firefights. Ammo is frequent in HL2/EP1, as it is the weapon of choice for CP units and soldiers. In EP2, ammo is less frequent as the player should encounter much less combine forces, however rebel establishments like white forest should have bountiful supplies of ammo. In all games, close combat areas should put a balanced emphasis on Shotgun and SMG usage.

Half-Life 2: Deathmatch Half-Life 2: Deathmatch:

[Todo]

Entropy : Zero Entropy : Zero/Entropy : Zero 2 Entropy : Zero 2:

In the Entropy : Zero series, this weapon has been given a significant increase to both damage and recoil, giving a heavier emphasis on close-range fights. Ammo is somewhat frequent, as most rebels use the SMG. The player should have a fair amount of SMG ammunition at all times.

Flags

Start Constrained : [1]
Prevents the model from moving.
Deny player pickup (reserve for NPC) : [2]
Not puntable by Gravity Gun : [4]

Inputs

HideWeapon  !FGD
If this weapon is being held, hide the worldmodel and/or viewmodel via EF_NODRAW. Weapon will still be useable. The weapon will become visible again if the holder is to switch between weapons in their inventory.

Outputs

OnNPCPickup
Fires when an NPC picks up this weapon. (!activator is the NPC.)
OnPlayerUse
Fires when the player +uses this weapon. (!activator is the player.)
OnPlayerPickup
Fires when a player picks up this weapon. (!activator is the player.)
OnCacheInteraction
Fires when the player 'proves' they've found this weapon. Fires on: Player Touch, +USE pickup, Physcannon pickup, Physcannon punt.