Difference between revisions of "IsEquipped"
Jump to navigation
Jump to search
usage note
imported>Odessa (Created. source nvse_whatsnew) |
imported>Odessa (usage note) |
||
Line 1: | Line 1: | ||
{{Function | {{Function | ||
|origin = NVSE | |origin = NVSE | ||
|summary = Returns true (1) if the calling | |summary = Returns true (1) if the [[calling reference]] is currently equipped by its owner. Added by NVSE 4.5. | ||
|name = IsEquipped | |name = IsEquipped | ||
|returnType = bool | |returnType = bool | ||
|referenceType = reference | |referenceType = reference | ||
|arguments = | |arguments = | ||
|example = | |example = }} | ||
==Example== | |||
<pre> | |||
ref rItem | |||
foreach rItem <- PlayerREF | |||
if rItem.IsEquipped | |||
; do something | ; do something | ||
endif | |||
loop | |||
</pre> | |||
==Usage Note== | |||
*As of NVSE 4.5.7, this function must be called on an inventory <b>reference</b>. You can obtain a (temporary) inventory reference using a [[foreach]] loop on a container, or functions such as [[GetInvRefsForItem]], [[GetFirstRefForItem]], or [[CreateTempRef]]. | |||
==See Also== | ==See Also== | ||
*[[EquipMe]] | *[[EquipMe]] | ||
*[[UnequipMe]] | *[[UnequipMe]] | ||
*[[EquipItem2]] | *[[EquipItem2]] | ||
*[[GetEquippedObject]] | |||
[[Category:Functions_(NVSE)]] | [[Category:Functions_(NVSE)]] |