PDA

View Full Version : Armor Material Question


Culhwch
May 7th, 2007, 10:34 PM
I'm adding some new armor material types, and naturally I hit one that reduces the weight of an armor, but the reduction is not a mathematical function (like mithral's weight/2). Luckily, there's only a few base armors that the material can be applied too, and they all have different weights. But I can't seem to access the base armor's weight; container.parent.field[gWeight].value is returning a value of 0. How would I get the weight of the armor I'm working with?

Thanks.

rob
May 8th, 2007, 10:06 PM
At 11:34 PM 5/7/2007, you wrote:
I'm adding some new armor material types, and naturally I hit one that reduces the weight of an armor, but the reduction is not a mathematical function (like mithral's weight/2). Luckily, there's only a few base armors that the material can be applied too, and they all have different weights. But I can't seem to access the base armor's weight; container.parent.field[gWeight].value is returning a value of 0. How would I get the weight of the armor I'm working with?
It sounds like you are doing things right in terms of the mechanics. Most likely, the timing of your script is causing it to be evaluated BEFORE the "gWeight" field is being updated. The script that is setting that field is being evaluated in phase "Prelevel" at priority "5000". Make sure your script occurs in either a later phase or at a later priority within the same phase. That will ensure that the value has been setup properly before you access it.