Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

LiquidBounce Forum

  1. Home
  2. ScriptAPI
  3. How to possibly convert percentages to height

How to possibly convert percentages to height

Scheduled Pinned Locked Moved ScriptAPI
10 Posts 3 Posters 198 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • DreamWasFuckedD Offline
    DreamWasFuckedD Offline
    DreamWasFucked
    wrote on last edited by
    #1

    So I have this code which converts health to percentages

    Math.percent = function(min, max) {
        return (min / max * 100);
    }
    
    var pHealth = Math.percent(target.getHealth(), target.getMaxHealth()).toFixed(1)
    

    And now how to convert the health to the height of the player

    To make the player's health percentage the same as the player's height

    CzechHekC A 2 Replies Last reply
    0
    • CzechHekC Offline
      CzechHekC Offline
      CzechHek
      replied to DreamWasFucked on last edited by
      #2

      @skidma Why would you make a player as high as his health percentage?

      DreamWasFuckedD 1 Reply Last reply
      0
      • DreamWasFuckedD Offline
        DreamWasFuckedD Offline
        DreamWasFucked
        replied to CzechHek on last edited by
        #3

        @czechhek health bar

        CzechHekC 1 Reply Last reply
        0
        • CzechHekC Offline
          CzechHekC Offline
          CzechHek
          replied to DreamWasFucked on last edited by
          #4

          @skidma You just do percentage * rect height

          DreamWasFuckedD 1 Reply Last reply
          0
          • A Offline
            A Offline
            Aftery
            replied to DreamWasFucked on last edited by
            #5

            @skidma basic multiplication/division

            1 Reply Last reply
            0
            • DreamWasFuckedD Offline
              DreamWasFuckedD Offline
              DreamWasFucked
              replied to CzechHek on last edited by
              #6

              @czechhek I need the health bar to take the value of the player's height

              CzechHekC 1 Reply Last reply
              0
              • CzechHekC Offline
                CzechHekC Offline
                CzechHek
                replied to DreamWasFucked on last edited by
                #7

                @skidma what the

                DreamWasFuckedD 1 Reply Last reply
                0
                • DreamWasFuckedD Offline
                  DreamWasFuckedD Offline
                  DreamWasFucked
                  replied to CzechHek on last edited by DreamWasFucked
                  #8

                  @czechhek I need the size to work the same way as here (esp health bar) EXHIBITION - BESTEST HYPIXEL HACKED CLIENT?!?! – 03:14
                  — Arithmo

                  A CzechHekC 2 Replies Last reply
                  0
                  • A Offline
                    A Offline
                    Aftery
                    replied to DreamWasFucked on last edited by
                    #9

                    @skidma this is starting to sound like an uid issue irl
                    //thread closed

                    1 Reply Last reply
                    0
                    • CzechHekC Offline
                      CzechHekC Offline
                      CzechHek
                      replied to DreamWasFucked on last edited by
                      #10

                      @skidma said in How to possibly convert percentages to height:

                      @czechhek I need the size to work the same way as here (esp health bar) EXHIBITION - BESTEST HYPIXEL HACKED CLIENT?!?! – 03:14
                      — Arithmo

                      @czechhek said in How to possibly convert percentages to height:

                      @skidma You just do percentage * rect height

                      1 Reply Last reply
                      0

                      About
                      • Terms of Service
                      • Privacy Policy
                      • Status
                      • Contact Us
                      Downloads
                      • Releases
                      • Source code
                      • License
                      Docs
                      • Tutorials
                      • CustomHUD
                      • AutoSettings
                      • ScriptAPI
                      Community
                      • Forum
                      • Guilded
                      • YouTube
                      • Twitter
                      • D.Tube
                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups