• 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

Unrecognized Field in pstFlankin

Kacey3

New member
So, following the video tutorials, I brought up the debugging tools to determine that the field used to value the "On" status of the Flanking condition is plsOn. However, when I tried to write an Eval script to trigger based on Flanking being active, I get an error back that declares that plsOn is not a valid field. Any thoughts on what have I done wrong?

Code:
if (hero.child[pstFlankin].field[plsOn] <> 0) then

     hero.child[Damage].field[tDamBonus].value += 1

endif
 
You have the field correct but you forgot the .value afterwards. This is because some fields actually have text and instead end with .text.

So change this from:
Code:
if (hero.child[pstFlankin].field[plsOn] <> 0) then
to
Code:
if (hero.child[pstFlankin].field[plsOn].value <> 0) then

Also keep in mind that HL Scripting is case sensitive. So the word "value" is different than "Value". :)
 
Actually, and I'm embarrassed to admit, it's not plsOn, it's pIsOn. The font in the debugging screens made it incredibly unclear that it was an uppercase I, rather than a lowercase L.
 
LOL yea that has gotten me before also. I often past scripts or IDs into TextPad as its has a nicer font and much bigger font. :)
 
Back
Top