• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Armor Material Question

Culhwch

Well-known member
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.
 
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.
 
Back
Top