GetCurrentHealth

Revision as of 11:06, 12 July 2015 by imported>Ketoleperouch
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

A command for Oblivion Script Extender

Syntax:

(health:float) reference.GetCurrentHealth

Returns the current health of the calling reference.

Example:

ref Base
ref Weapon
float WeaponHealth
array_var InvRefs
let Base := ( PlayerRef.GetEquippedObject 16 )
ForEach InvRefs <- ( GetInvRefsForItem Base )
 let Weapon := *InvRefs
 if Eval ( Weapon.IsEquipped )
  let WeaponHealth := ( Weapon.GetCurrentHealth )
 endif
Loop

Get the current health of the player's equipped weapon. Not recommanded if you're only interested in the health of the currently equipped weapon. Use GetEquippedCurrentHealth instead which is faster than creating Inventory References for the currently equipped Weapon, and looping through all of them afterwards.

See AlsoEdit