GetItemHealthPercent - ObjectReference

From the CreationKit Wiki
Jump to navigation Jump to search

Member of: ObjectReference Script

Returns the item health percent of this object. Items begin at 100% (1.0) and can be increased via crafting.

Syntax[edit | edit source]

float Function GetItemHealthPercent() native

Parameters[edit | edit source]

None.

Return Value[edit | edit source]

The item health percent of this reference.

  • 1.1 = Fine
  • 1.2 = Superior
  • 1.3 = Exquisite
  • 1.4 = Flawless
  • 1.5 = Epic
  • 1.6 = Legendary

Examples[edit | edit source]

if (SwordRef.GetItemHealthPercent() > 1.0 )
  Debug.Trace("Sword has been smithed")
endIf

Notes[edit | edit source]

  • If this function is called on a ref that isn't an item, or a ref whose health percent has somehow been manipulated to be a value less than 1, then this function will return 1.

See Also[edit | edit source]