CBaseCombatWeapon
Jump to navigation
Jump to search
Code classes:
CBaseCombatWeapon
(weapons)CBaseAnimating
(models)CBaseEntity
(all ents)
CBaseCombatWeapon
is a base code class for all holdable weapon entities in Source. From here, each game typically derives into their own game-specific class.
Flags[edit | edit source]
- 1: Start constrained - Makes the weapon not move. Bug: Does not work in some games.
- 1073741824 (Not in FGD): No respawn (only available in
Half-Life 2: Deathmatch) - Weapon will not respawn.
Inputs[edit | edit source]
- HideWeapon (Not in FGD)
- Attempts to make the weapon invisible. It may not disappear completely. Note:
Just makes the player take out the weapon again.
Outputs[edit | edit source]
- OnPlayerUse
- Fires when a player
+use
s this weapon. This doesn't necessarily mean the weapon was actually acquired. - OnPlayerPickup
- Fires when a player picks up the weapon and is now able to actually use it as a weapon.
- OnNPCPickup
- Fires when the weapon is picked up by an NPC.
- OnCacheInteraction
- Fires when the player somehow proves they have found the weapon. Methods include entering the pickup radius, and punting with the gravity gun
.