Senior Member
Volunteer Data File Author
Join Date: Feb 2009
Posts: 173
|
What page are you using as a model? Try:
Code:
<eval value="1" phase="Traits" priority="4000"> <before name="Derived trtFinal"/> <after name="Calc trtFinal"/><![CDATA[ field[trtBonus].value += #trait[attrDef] - 3 if (field[trtFinal].value <= -1) then field[trtFinal].value = 0 endif ]]></eval> |
#11 |
Junior Member
Join Date: May 2012
Posts: 7
|
I'm using this as the example:
http://hlkitwiki.wolflair.com/index....Traits_(Savage) And that doesn't work either. It just ignores the if statement like it wasn't there. |
#12 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
FourCartridge, please show us the code you're written (the updated version, after you removed the extra <![CDATA[ ), so we can help you debug it.
|
#13 |
Junior Member
Join Date: May 2012
Posts: 7
|
Here you go.
Code:
<thing id="trDefense" name="Armor" compset="Trait" isunique="yes" description="Description goes here"> <fieldval field="trtAbbrev" value="Def"/> <tag group="explicit" tag="3"/> <tag group="User" tag="Combat"/> <tag group="DashTacCon" tag="Combat"/> <eval value="1" phase="Traits" priority="4000"> <before name="Derived trtFinal"/> <after name="Calc trtFinal"/><![CDATA[ field[trtBonus].value += #trait[attrDef] - 3 if (field[trtFinal].value <= -1) then field[trtFinal].value = 0 endif ]]></eval> </thing> |
#14 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Look in traits.str, at the Derived component's script named "Derived trtFinal". That script comes after this one, right? So, think about how they'll interact. What will happen to the trtFinal you're setting in this script when "Derived trtFinal" runs?
|
#15 |
|
|