FishBiter Posted March 12, 2013 Share Posted March 12, 2013 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 More sharing options...
Gribbleshnibit8 Posted March 12, 2013 Share Posted March 12, 2013 set rItem to Player.GetEquippedObject 2 set fTemp to Player.GetEquippedCurrentHealth 2 set fTemp to fTemp / GetHealth rItemfTemp 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 More sharing options...
FishBiter Posted March 13, 2013 Author Share Posted March 13, 2013 (edited) I was looking at that GetHealth function and couldn't figure out how it works... I will try this :) Edited March 13, 2013 by FishBiter Link to comment Share on other sites More sharing options...
Recommended Posts