1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Resolved CombatGuage.getPercent() only returning 100 or 0

Discussion in 'Client & Site Support' started by SlashnHax, May 30, 2015.

  1. SlashnHax

    Joined:
    Dec 10, 2014
    Messages:
    3,212
    Likes Received:
    1,042
    Code:
    Code (Text):
    1. Actor a = LocalPlayer.getTarget();
    2. CombatGauge guage;
    3. healthPercent = (a == null || (guage = a.getHealthGauge()) == null)?0:guage.getPercent();
    4. ...
    5. System.out.println(healthPercent);
    Output:
    Code (Text):
    1. 0.0
    2. 0.0
    3. 0.0
    4. 0.0
    5. 0.0
    6. 0.0
    7. 0.0
    8. 100.0
    9. 100.0
    10. 100.0
    11. 100.0
    12. 100.0
    13. 100.0
    @Cloud @Arbiter

     
  2. Best Answer:
    Post #6 by Cloud, Jun 24, 2015
  3. Hazard

    Joined:
    Apr 18, 2015
    Messages:
    408
    Likes Received:
    84
    What about the Health api?
    Health.getCurrent(); or Health.getCurrentPercent();
     
  4. SlashnHax

    Joined:
    Dec 10, 2014
    Messages:
    3,212
    Likes Received:
    1,042
    I'm getting the percent of the target, not the player.
     
  5. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    I need more information. OSRS or RS3. If RS3, which combat mode. Do you have the target display thing turned on so instead of the thin gauges it uses the detailed interface?
     
  6. SlashnHax

    Joined:
    Dec 10, 2014
    Messages:
    3,212
    Likes Received:
    1,042
    RS3.
    EOC combat and interface mode.
    Target display(with the name, hp etc) turned on (runescape default).
    --- Double Post Merged, Jun 6, 2015, Original Post Date: May 30, 2015 ---
    @Cloud problem still exists.
    --- Double Post Merged, Jun 24, 2015 ---
    boop
     
  7. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    Fixed for the next release.
     

Share This Page

Loading...