Tf weapon sword: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Classifying as model entity)
 
(5 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{stub}}
{{CD|CTFSword|file1=tf_weapon_sword.cpp}}
{{this is a|model entity|game=Team Fortress 2|name=tf_weapon_sword}}
{{tf2 point|tf_weapon_sword}}


==Entity description==
==Entity description==
The weapons that use this entity are the Three-Rune Blade (Scout melee) and the Claidheamh Mòr, the Eyelander, and the Persian Persuader (Demoman melee).
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 Targetname}}


==Inputs==
==Inputs==
{{I Targetname}}
{{I Weapon}}


==Outputs==
==Outputs==
{{O Targetname}}
{{O Weapon}}

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.