User Tag List

Results 1 to 3 of 3

Thread: Calculating Months of Rest

  1. #1
    Clicker Multimedia Fusion 2Android Export Module
    Corlen's Avatar
    Join Date
    Mar 2007
    Location
    Your House
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Calculating Months of Rest

    OK so I have this thing where special units need rest for so many months in my game. I have their current HP recorded in a variable at the end of a battle and their max HP recorded in another variable. I'm wondering, how would I get it so 100% HP returns 0 months needed to rest while 0% returns 5 months of rest needed. I tried getting the percentage between the two variables and then dividing it by 20 but this does the results backwards.

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleMac Export ModuleUnicode Add-on
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    AyreGuitar's Avatar
    Join Date
    Jan 2011
    Location
    Wales, UK
    Posts
    1,113
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try this:

    5*(1-(HPCurrent/(HPMax+0.0))

  3. #3
    Clicker Multimedia Fusion 2Android Export Module
    Corlen's Avatar
    Join Date
    Mar 2007
    Location
    Your House
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks a bunch.

Similar Threads

  1. This months Wired magazine.
    By DJFuego in forum Articles
    Replies: 3
    Last Post: 7th July 2010, 10:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •