Quote:
Originally Posted by Illyahr
OK, fugured out what I was doing wrong. Just need help cleaning up the scripting
Code:
if (hero.childfound[???].tagis[Helper.CurrArmor] <> 0) then
if (hero.child found[???].tagis[Helper.Proficient] <> 0) then
perform hero.child[kSwim].delete[Helper.ArmorChk2]
endif
endif
foreach pick in hero from BaseArmor where "Helper.CurrArmor & Helper.Proficient"
#skillbonus[kSwim] -= each.tagis[mArmorChk.?] / 2
next each
Need a field in the first part and the math is coming out weird in the second part. Any ideas?
|
You're foreach loop is right, but it's in the wrong place. You need to use that to find the armor and then get the value.
Code:
var pen as number
foreach pick in hero from BaseArmor where "Helper.CurrArmor & Helper.Proficient"
pen = eachpick.field[mArmorChk].value
nexteach
After you get the Armor Check value, you can modify it as you see fit outside of the foreach loop. Then you can assign the value to Swim.