View Single Post
rob
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 8,232

Old August 12th, 2001, 02:48 AM
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
rob is offline   #2 Reply With Quote