GetItemRefCurrentHealth

From GECK
Jump to: navigation, search


A function added by the JIP NVSE Plugin.

Description

Returns the health of the calling item. Unlike GetEquippedCurrentHealth, this function can also called on an inventory reference. The calling item reference does not have to be equipped.

The function can return the health value in one of three ways, depending on the optional argument percOrBase:

0	Current Health (default)
1	Current Health Percent (0.0 to 1.0)
2	Base Health (incl. bonuses from weapon mods)

Syntax

[help]
(health:float) reference.GetItemRefCurrentHealth percOrBase:0/1/2

Example

set fCurrHealth to rItemRef.GetItemRefCurrentHealth
set fHealthPerc to rItemRef.GetItemRefCurrentHealth 1
set fBaseHealth to rItemRef.GetItemRefCurrentHealth 2 

See Also