Jump to content

Little bit of math help


Rad
 Share

Recommended Posts

Damage calculator, positive armor reduces damage. I use this line:

GUICtrlSetData($dmg_optionlabel9,  int(GUICtrlRead($dmg_mininput) * StringMid($type_value,1,4)) & " - " &  int(GUICtrlRead($dmg_maxinput) * StringMid($type_value,1,4)))

dmgoptionlabel9 is one of my eight damage-types. Each shows min-max display. StringMid looks like this: "1.00,1.50,1.00,0.50,0.75...".

Now armor should decrease damage taken (The number shown) using this equation:

(($armor)*0.06)/(1+0.06*($armor)) ...

How would I apply this section to slightly reduce the damage? Here Ill break the math into parts:

Min: int(GUICtrlRead($dmg_mininput) * StringMid($type_value,1,4))

Max: int(GUICtrlRead($dmg_maxinput) * StringMid($type_value,1,4)))

EDIT~Curse me solving things on my own after 10 minutes of frustration, I forgot to quote the numbers "like this" :lmao:

Edited by Rad
Link to comment
Share on other sites

Damage calculator, positive armor reduces damage. I use this line:

GUICtrlSetData($dmg_optionlabel9,  int(GUICtrlRead($dmg_mininput) * StringMid($type_value,1,4)) & " - " &  int(GUICtrlRead($dmg_maxinput) * StringMid($type_value,1,4)))

dmgoptionlabel9 is one of my eight damage-types. Each shows min-max display. StringMid looks like this: "1.00,1.50,1.00,0.50,0.75...".

Now armor should decrease damage taken (The number shown) using this equation:

(($armor)*0.06)/(1+0.06*($armor)) ...

How would I apply this section to slightly reduce the damage? Here Ill break the math into parts:

Min: int(GUICtrlRead($dmg_mininput) * StringMid($type_value,1,4))

Max: int(GUICtrlRead($dmg_maxinput) * StringMid($type_value,1,4)))

EDIT~Curse me solving things on my own after 10 minutes of frustration, I forgot to quote the numbers "like this" :lmao:

quotes are for strings, shouldn't need them for numbers...
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...