Solved Health-Balancing | The Idea

Discussion in 'Plugin Development' started by KingPsychopath, Mar 7, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    KingPsychopath

    So, I've got the boss health bar being used as a health-board, displaying the HP amount going up to around 20,000 max.
    Now I scaled the health down by 10, meaning 1 heart is 5HP ( Keep in mind I'm doing things specifically like this )
    So far so good, but in the long term run somebody is going to end up with a screen full of hearts.
    Now here's what I'm asking for, If I was to balance out the hearts and force them to display only 10, whilst using that 10 as a percentage of the actual HP, how would I go about doing this?
    For starters how would I force it to show 10 hearts?
    @AraFTWxD Desle tobiyas filoghost
     
  2. Offline

    Desle

    KingPsychopath

    player.setHealthScale(20D), right? I'm not sure though
     
  3. Offline

    Jalau


    Yes right ;)
     
  4. Offline

    KingPsychopath

    Thanks, for your help.
    But for my server my players can gain health, around 5 hp every level.
    This kinda gives them more hearts.
     
  5. Offline

    KingPsychopath

  6. Offline

    Desle

    KingPsychopath
    If you set a player's health, you will need to set the health scale after it. So you could edit those plugins if you made them yourself, to set the healthscale everytime they levelup.
     
  7. Offline

    KingPsychopath

    Ah, I'ma try this now, thanks.

    Alright, thanks!
    It worked, I was changing the scale twice that was my problem I forgot about another plugin I made.
    On a similar note, how would I force the decimal values to a specific amount etc. 2. ( Can't be bothered to open eclipse atm ) I've made a way already just for some reason when players wear armor the old messed up decimal places like : 3.25423525235 : return.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
Thread Status:
Not open for further replies.

Share This Page