tf_weapon_base

From Valve Developer Community
Revision as of 14:39, 2 July 2024 by Nescius (talk | contribs) (-added class hierarchy, cleanup)
Jump to navigation Jump to search
C++ Class hierarchy
CTFWeaponBase
CBaseCombatWeapon
CBaseAnimating
CBaseEntity
C++ tf_weaponbase.cpp

tf_weapon_base is a point entity available in Team Fortress 2 Team Fortress 2. This entity is used by every weapon entity in TF2 as a base entity, and they derive all weapon behavior from tf_weapon_base.

Outputs

Weapon:

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