Tf weapon base: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Updated old entity format to {{this is a}}. This action was perfomed by a bot.)
m (Changed parameters of {{this is a}} to comply with the updated version. This action was performed by a bot.)
Line 1: Line 1:
{{this is a|e0|game=tf2|name=tf_weapon_base}} This entity is used by every weapon entity in TF2 as a base entity, and they derive all weapon behavior from <code>tf_weapon_base</code>.
{{this is a|point entity|game=Team Fortress 2|name=tf_weapon_base}} This entity is used by every weapon entity in TF2 as a base entity, and they derive all weapon behavior from <code>tf_weapon_base</code>.


{{code class|CTFWeaponBase|tf_weapon_base.cpp}}
{{code class|CTFWeaponBase|tf_weapon_base.cpp}}

Revision as of 19:45, 17 May 2024

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.

C++ In code, it is represented by theCTFWeaponBaseclass, defined in thetf_weapon_base.cppfile.

Keyvalues

Inputs

Outputs

Note.pngNote:Content moved to Rendering and studio model related KIO/Outputs for continuation of page history

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.