Jump to content

How to get current equipped armor durability percent


FishBiter

Recommended Posts

Just as the title says, I can't find out what the function is to get the current durability percentage of the player's equipped armor.

 

The only relevant function I've found is

 

Player.getequippedcurrenthealth 2

 

 

 

I need a function that either returns the max health for equipped object 2, or that gives the health percentage of object 2.

 

Anyone know?

Link to comment
Share on other sites

 

set rItem to Player.GetEquippedObject 2
set fTemp to Player.GetEquippedCurrentHealth 2
set fTemp to fTemp / GetHealth rItem

fTemp will now have the correct health percentage of the item in slot 2.

GetHealth returns the editor set value of health for any item that has a health value. Then you simply divide the current health by the max health to get the current percentage.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...