Tf weapon sword: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Updated page with modern-day info.)
m (Classifying as model entity)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{tf2 point|tf_weapon_sword}}
{{CD|CTFSword|file1=tf_weapon_sword.cpp}}
 
{{this is a|model entity|game=Team Fortress 2|name=tf_weapon_sword}}
{{code class|CTFSword|tf_weapon_sword.cpp}}


==Entity description==
==Entity description==
A sword item. This entity is used for the [https://wiki.teamfortress.com/wiki/Claidheamh_M%C3%B2r Claidheamh Mòr], [http://wiki.teamfortress.com/wiki/Eyelander Eyelander] and its reskins, [https://wiki.teamfortress.com/wiki/Persian_Persuader Persian Persuader], and [https://wiki.teamfortress.com/wiki/Scotsman%27s_Skullcutter Scotsman's Skullcutter] items.
A sword item. This entity is used for the [https://wiki.teamfortress.com/wiki/Claidheamh_M%C3%B2r Claidheamh Mòr], [http://wiki.teamfortress.com/wiki/Eyelander Eyelander] and its reskins, [https://wiki.teamfortress.com/wiki/Persian_Persuader Persian Persuader], and [https://wiki.teamfortress.com/wiki/Scotsman%27s_Skullcutter Scotsman's Skullcutter] items.
==Keyvalues==
{{KV BaseAnimating|base=1}}
{{KV BaseEntity|base=1}}


==Inputs==
==Inputs==
{{IO|HideWeapon|If this weapon is being held, hide the worldmodel and/or viewmodel via {{ent|EF_NODRAW}}. The weapon will become visible again if the holder is to switch between weapons in their inventory.}}
{{I Weapon}}
{{I BaseAnimating|base=1}}
{{I BaseEntity|base=1}}


==Outputs==
==Outputs==
{{IO|OnNPCPickup|Fires when an [[NPC]] picks up this weapon. {{activator|NPC}}}}
{{O Weapon}}
{{IO|OnPlayerUse|Fires when the player [[+use]]s this weapon. {{PlAct}}}}
{{IO|OnPlayerPickup|Fires when a player picks up this weapon. {{PlAct}}}}
{{IO|OnCacheInteraction|Fires when the player 'proves' they've found this weapon. Fires on: Player Touch, +USE pickup, [[weapon_physcannon|Physcannon]] pickup, Physcannon punt.}}
{{O BaseAnimating}}
{{O BaseEntity}}

Latest revision as of 04:35, 19 May 2025

C++ Class hierarchy
CTFSword
CTFDecapitationMeleeWeaponBase
CTFWeaponBaseMelee
CTFWeaponBase
CBaseCombatWeapon
CBaseAnimating
CBaseEntity
C++ tf_weapon_sword.cpp

tf_weapon_sword is a model entity available in Team Fortress 2 Team Fortress 2.

Entity description

A sword item. This entity is used for the Claidheamh Mòr, Eyelander and its reskins, Persian Persuader, and Scotsman's Skullcutter items.

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

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.