Quote:
Originally Posted by Illyahr
Working on a template that reduces some stats, but not below 3. I think I have the right code, but it isn't working.
Code:
var intval as number
intval = minimum(hero.child[aINT].field[aNormal].value-3,6)
hero.child[aINT].field[aNormal].value -= intval
It should check what attribute-3 is and apply either that (making the score 3) or 6 as a penalty to the attribute. What am I doing wrong?
|
Hard to say without knowing your results or doing some testing. I might suggest a different approach, though. Something like this, perhaps:
Code:
var intval as number
intval = hero.child[aINT].field[aNormal].value-6
hero.child[aINT].field[aNormal].value = maximum(intval,3)