Resolved CombatGuage.getPercent() only returning 100 or 0

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

  1. SlashnHax

    SlashnHax The Chosen One

    Joined:
    Dec 10, 2014
    Messages:
    2,935
    Likes Received:
    853
    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:
    394
    Likes Received:
    84
    What about the Health api?
    Health.getCurrent(); or Health.getCurrentPercent();
     
  4. SlashnHax

    SlashnHax The Chosen One

    Joined:
    Dec 10, 2014
    Messages:
    2,935
    Likes Received:
    853
    I'm getting the percent of the target, not the player.
     
  5. Cloud

    Cloud The Developer

    Joined:
    Jul 28, 2013
    Messages:
    2,378
    Likes Received:
    781
    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

    SlashnHax The Chosen One

    Joined:
    Dec 10, 2014
    Messages:
    2,935
    Likes Received:
    853
    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 The Developer

    Joined:
    Jul 28, 2013
    Messages:
    2,378
    Likes Received:
    781
    Fixed for the next release.
     

Share This Page

Loading...