Guest
Posts: n/a
|
All,
I was wanting a child unit to inherit the stat value of its parent. I realize I can use the chld attribute to increase or decrease a child unit's stats, but I am unclear as to how one would "copy" the final stat of the parent to the child. If anyone knows how to do this please let me know. Thanks, Woody __________________________________________________ _______________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 8,232
|
The solution is to use the "chld" attribute. If you say
"chld:foo@chld=(parnt)", then the "parnt" stat of the parent unit is assigned to the "chld" stat of the child unit. It's also legal to use the same stat for both parent and child if you want. This technique is used in the CAV and Full Thrust data files if you want to take a look. However, sequencing of options is critical to making it all work, since the "chld" attribute is cached in advance for propogation to the children. Basically, you need to calculate the final stat value within the parent, THEN issue the "chld" attribute, and THEN attach the child unit. I provided some useful background on the "chld" attribute in a post on 8/8 with the subject "Timing and the chld attribute". Please read that post for valuable context on its use. That ought to explain the nuances that lead to the sequence I outline above. If any of this is still fuzzy, please let me know and I'll be happy to clarify. Thanks, Rob At 01:54 AM 8/12/2001 -0500, you wrote: >All, > >I was wanting a child unit to inherit the stat value of its parent. I >realize I can use the chld attribute to increase or decrease a child unit's >stats, but I am unclear as to how one would "copy" the final stat of the >parent to the child. If anyone knows how to do this please let me know. > >Thanks, > >Woody |
#2 |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Allies limitations | Colen | Army Builder | 0 | July 2nd, 2003 09:31 PM |
Allies limitations | werewolf25 at earthlink.n | Army Builder | 0 | June 18th, 2003 08:15 AM |
"over:" attribute | mobo at adelphia.net | Army Builder | 1 | June 7th, 2002 09:51 AM |
an odd problem with xlat, and another with chld | mgehl at home.com | Army Builder | 0 | October 28th, 2001 10:48 AM |
Timing and the chld attribute, and smap for costs | mgehl at home.com | Army Builder | 3 | August 8th, 2001 07:13 PM |