I'm creating a custom 'Armor, Magic' to represent the effect of the Ice Armor spell.
I've got everything but the EvalScripting completed; I want to make the armor have no weight when it is unequipped, this being intended to represent that the spell is no longer in effect. I tried the following at the top of the EvalScript where I added the situational bonus:
. . . but that threw the error 'Invalid field syntax used' for the gWeight line. I double-checked the debug fields, and the armor DOES have a gWeight field.
Question #1: What am I doing wrong here? (I suspect that the if block is altering the context, but I don't know how to reference the context outside of the if block so that I can assign a new value to the field.)
Question #2: Since I'm already testing the gIsEquip value, I'd like to use else logic to bypass the typical doneif line before my #situational, but I am unaware of anything that uses this logic which I can use as a template. Suggestions?
Inner Sea Gods said:You create a suit of armor made of ice. While cold to the touch, it does not harm the wearer, especially if worn over normal clothing (though it can hasten the effects of exposure in cold environments). It offers the same protection as a breastplate, except it has hardness 0 and 30 hit points. If the intended wearer is immersed in water when you cast this spell, you may form the armor around the wearer (who may be you); otherwise the wearer must don the armor normally. Attacks against the wearer that create heat or fire degrade the armor, reducing its armor bonus by 1 for every 5 points of fire damage the wearer takes; when the armor’s bonus to AC reaches 0, the armor is destroyed and the spell ends. Because the ice is slightly buoyant, the wearer gains a +2 circumstance bonus on Swim checks, except when swimming downward. Druids can wear ice armor without penalty.
I've got everything but the EvalScripting completed; I want to make the armor have no weight when it is unequipped, this being intended to represent that the spell is no longer in effect. I tried the following at the top of the EvalScript where I added the situational bonus:
Code:
if (field[gIsEquip].value = 0) then
field[gWeight] = 0
endif
Question #1: What am I doing wrong here? (I suspect that the if block is altering the context, but I don't know how to reference the context outside of the if block so that I can assign a new value to the field.)
Question #2: Since I'm already testing the gIsEquip value, I'd like to use else logic to bypass the typical doneif line before my #situational, but I am unaware of anything that uses this logic which I can use as a template. Suggestions?