Rad Posted January 12, 2006 Share Posted January 12, 2006 (edited) 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" Edited January 12, 2006 by Rad Link to comment Share on other sites More sharing options...
seandisanti Posted January 12, 2006 Share Posted January 12, 2006 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" quotes are for strings, shouldn't need them for numbers... Link to comment Share on other sites More sharing options...
Rad Posted January 12, 2006 Author Share Posted January 12, 2006 >_> Well the script ended with an error ... forgot what it says was 4 hours ago. I added quotes and it worked sooo oh well Link to comment Share on other sites More sharing options...
seandisanti Posted January 12, 2006 Share Posted January 12, 2006 >_>Well the script ended with an error ... forgot what it says was 4 hours ago. I added quotes and it worked sooo oh wellwell atleast it fixed it, i guess that's the important part... Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now