• 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

Editor Help: Ice Armor

Skarn

Active member
I'm creating a custom 'Armor, Magic' to represent the effect of the Ice Armor spell.

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
. . . 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?
 
In line 1, you start on a field, and then transition to the current value of that field.

On line 2, you start on a field, and then don't transition anywhere - Hero Lab doesn't know what you want to do with it.
 
I see it; I'm expecting .value to be a default property. Fixed.

I had to resolve a timing issue after that, but now its working as intended. Thanks!
 
Back
Top