Jump to content

Player health getters returning weird values


Bitshift

Recommended Posts

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 by Bitshift
Link to comment
Share on other sites

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 by Joseph
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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