Skip to main content

player_hasweapon

player_hasweapon icon
Point entityPorted from Featureful

A player_hasweapon checks whether the player who triggered it has a weapon, and fires Pass Target if they have it and Fail Target if they don't. As the master of another entity, such as a trigger_multiple, a button or a door, it is on while the activator has the weapon.

Attributes​

The entity also has these common keys:

KeyDescriptionDefault
Weapon classnameweapon_name

Names the weapon by its class name, such as weapon_sword or weapon_rpg.

If you leave this key empty, any weapon counts, the fists too.

Pass Targetpass_target

Fires this target if the player has the weapon, with that player as the activator.

Fail Targetfail_target

Fires this target if the player doesn't have the weapon, with that player as the activator.

Notes​

  • It only checks an alive player. For anyone else it fires nothing, and as a master it is off

See also​

Changes since 1.38​

  • player_hasweapon is new