weapon.JPGarmor HP.JPG
Okay I have something working but I just can't quite get it correct.
Heres some of the code i'm using and a screenshot of current state.
Code:
~ Set up some variables to use later
Var ObjHard as Number
Var ObjHp as Number
Var ObjSize as Number
~ Set the Variables to 0 as a base number
ObjHard = 0
ObjHp = 0
ObjSize = 0
~ Lets multiply our weapon bonus by 10 and 2 for each +1 enchantment
field[abValue].value += round(field[pChosen].chosen.field[wBonus].value * 10,0,-1)
field[abValue2].value += round(field[pChosen].chosen.field[wBonus].value * 2,0,-1)
~ Now lets check our material
if (#hasability[eAdamant] = 1) then
ObjHard = 20
ObjHp = 40
endif
I can't get the above red code to apply the special material Hp and Hardness values (20 Hardness / 40 HP)
What am I missing??? Should I be checking the weapon / armor Gizmo?
Also notice the Non Magical Longsword in the Screenshot HP 0 Hardness 0 so just a minor annoyance there.
But notice the Armor HP total which currently displays (almost) correctly. Hardness code to be applied after the weapon scripts are working properly.