HasWeapon
Checks if an NPC has a melee/ranged weapon, holstered, or equipped.
Syntax
HasWeapon:Ranged
-- Ranged weapon object
HasWeapon:Melee
-- Melee weapon object
Example
// (from ai_badger_test.p3s)
IfAttr "HasWeapon:ranged == 2 SetAttr equipped 1" // NPC has ranged weapon equipped
IfAttr "HasWeapon:ranged == 1 SetAttr has 1" // NPC has ranged weapon holstered
IfAttr "HasWeapon:ranged == 0 SetAttr doesnt_has 1" // NPC doesn't have a ranged weapon