Quote:
Originally Posted by Minous
Aaron the only reason I suggested a variable was for readability purposes. I find int_bonus far easier to remember then what hero.child[aINT].field[aBonus].value is referring to. Had this been a more complex request or a scaling value I would agree. But for what is just a simple reference value that is not going to be used outside of the script I felt that limiting the scope using a variable was appropriate.
|
The other way to keep things easier to read is to use Macros. So the above aInt stuff can be shortened to:
Code:
field[abValue].value += #attrbonus[aINT]
The above macro gets pretty much turned into hero.child[aINT].field[aBonus].value by the compiler. I find the ability to remember #attrbonus[] or #attrbonus1[] or #attmod[] much easier than remembering the field names.