January 4, 201610 yr For some odd reason, no matter the method of trying to return the player's current health (percent or current). a weird value is returned. I'm accessing the getter through a private API instance, so it's being called as follows: api.myPlayer().getHealthPrecent(); OR api.myPlayer().getHealth(); OR api.myPlayer().getCurrentHealth(); All of these return odd values. As an example, the account I've been testing scripts with has 13 HP, but getCurrentHealth() returns a different value than that. Any ideas on what could be causing this? Edited January 4, 201610 yr by Bitshift
January 4, 201610 yr Author well, why not just use getSkills().getDynamic(Skill.HITPOINTS); ? I suppose that will suffice for now. I would still like to know if this is a fault on my end or some hooks are not working properly at the moment.
January 4, 201610 yr I suppose that will suffice for now. I would still like to know if this is a fault on my end or some hooks are not working properly at the moment. Well you didn't tell us what values it was returning tho, which makes it harder to know whats up with it.
January 4, 201610 yr Health returns odd values if the HP bar is not rendered, so I assume you were not in combat?
January 5, 201610 yr For some odd reason, no matter the method of trying to return the player's current health (percent or current). a weird value is returned. I'm accessing the getter through a private API instance, so it's being called as follows: api.myPlayer().getHealthPrecent(); OR api.myPlayer().getHealth(); OR api.myPlayer().getCurrentHealth(); All of these return odd values. As an example, the account I've been testing scripts with has 13 HP, but getCurrentHealth() returns a different value than that. Any ideas on what could be causing this? those methods all fall back to the health bar your character displays on top of its head when in combat. SO for example if you are fighting and you can see it. You will get the right values. If the hp bar goes way and you eat food. It will still have the old value instead of the new updated values. When the hp bar Is visible again the value gets updates. Edited January 5, 201610 yr by Joseph
Create an account or sign in to comment