Tf weaponbase melee: Difference between revisions
Jump to navigation
Jump to search
Note:Emits weapon data file errors upon the creation of this entity through the
m (Changed parameters of {{this is a}} to comply with the updated version. This action was performed by a bot.) |
(-added class hierarchy, cleanup) |
||
Line 1: | Line 1: | ||
{{CD|CTFWeaponBaseMelee|file1=tf_weaponbase_melee.cpp}} | |||
{{this is a|point entity|game=Team Fortress 2|name=tf_weaponbase_melee}} It is used by all melee weapon entities in TF2 for fundamental melee weapon functions. | {{this is a|point entity|game=Team Fortress 2|name=tf_weaponbase_melee}} It is used by all melee weapon entities in TF2 for fundamental melee weapon functions. | ||
{{note|Emits weapon data file errors upon the creation of this entity through the <code>ent_create</code> command.}} | {{note|Emits weapon data file errors upon the creation of this entity through the <code>ent_create</code> command.}} | ||
==Dedicated Console Variables and Commands== | ==Dedicated Console Variables and Commands== | ||
Line 9: | Line 9: | ||
:: 1 - Melee weapons can randomly crit only if tf_weapon_criticals is also enabled. | :: 1 - Melee weapons can randomly crit only if tf_weapon_criticals is also enabled. | ||
:: 2 - Melee weapons can always randomly crit regardless of the `tf_weapon_criticals` setting. | :: 2 - Melee weapons can always randomly crit regardless of the `tf_weapon_criticals` setting. | ||
==Outputs== | ==Outputs== | ||
{{O Weapon}} | {{O Weapon}} |
Revision as of 14:38, 2 July 2024
![]() |
---|
CTFWeaponBaseMelee |
![]() |
tf_weaponbase_melee
is a point entity available in Team Fortress 2. It is used by all melee weapon entities in TF2 for fundamental melee weapon functions.

ent_create
command.Dedicated Console Variables and Commands
- tf_weapon_criticals_melee <integer>
- Determines whether melee weapons are eligible for critical hits.
- 0 - Melee weapons do not randomly crit.
- 1 - Melee weapons can randomly crit only if tf_weapon_criticals is also enabled.
- 2 - Melee weapons can always randomly crit regardless of the `tf_weapon_criticals` setting.
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.