• 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

Adjusting familiars

frumple

Well-known member
I am trying to run a script that adjusts a specific familiar of a specific race's hp, nat ac bonus and Int score.

here is what I have so far:

Code:
Final Phase/9500

foreach actor in portfolio where "IsRace.ArcFamil & IsRace.rmZSPHunSh"
   eachpick.field[tHP].value = minionHP
   eachpick.child[ArmorClass].field[tACNatural].value += minionAC
nexteach

where I define and calculate minionHP and minionAC earlier in the script. I am using the foreach statement because this is applies to multiple familiars.

The adjustment of HP works fine, but I get the error that the "Script reference in invalid in these circumstances" for the AC adjustment.

What am I missing?
 
When you foreach through actors, the eachpick is actually the actor pick. I think you need to transition from that, to the hero, and then to the armorclass child.

Code:
eachpick.hero.child[ArmorClass].field[tACNatural].value

Give that a try and tell me if it works. I'm not 100% sure it will.
 
Back
Top