IPGetTargetedOrEquippedMeleeWeapon
From NWN Lexicon
Jump to navigationJump to search
IPGetTargetedOrEquippedMeleeWeapon()
Returns the equipped melee weapon of a spell target.
Description
This function is to be used within a spell script.
If the spell target is an item, the function checks whether the item is a melee weapon and returns the weapon on a successful check. The weapon need not be equipped.
If the spell target is a creature, the function checks whether the creature has a melee weapon equipped and returns it.
If the targeted creature has no melee weapon equipped or the targeted item is not a melee weapon, OBJECT_INVALID is returned.
Remarks
This function only produces reliable results if called from a spell script. It calls #include index for more details.
Requirements
#include " x2_inc_itemprop "
Version
1.6?
See Also
functions: | |
constants: |
author: motu99, editor: Mistress