Also, the tSpeedMod field is acting wierd... I can't seem to set it = to something, or divide/multiply it, only add or subtract....
For example, say we are a human wearing Boots of Striding and Springing, giving us a a tSpeed value of 30, and a tSpeedMod of 40... What I want to do is make the modified speed 1/2 of it's current value. I would make this script....
hero.child[Speed].field[tSpeedMod].value = hero.child[Speed].field[tSpeedMod].value / 2
I have tried the script at various phases, but there is no change at all. So then I tried a "var whatever as number" and tried to set tSpeedMod's value equal to that, but again no change. tSpeedMod stayed at 40.
Next I tried to set it like this, making tSpeedMod equal to one half of tSpeed...
hero.child[Speed].field[tSpeedMod].value = hero.child[Speed].field[tSpeed].value / 2
In this case, tSpeedMod actually went up by half of the Speed, and then the enhancement bonus from the boots was added on. tSpeedMod became 55... weird.
So then I tried subtracting... like so.
hero.child[Speed].field[tSpeedMod].value -= hero.child[Speed].field[tSpeed].value / 2
Which did subtract 15, then added the +10 enhancement bonus from the boots, giving a tSpeedMod of 25...
So I guess I am having trouble getting the tSpeedMod.value and then halving it....
Can anybody give me a hand?