• 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

Child unit questions

Mathias

Moderator
Staff member
Question 1: An option selects a child unit - is it possible to have the option count be the model count?

Question 2: I would like to set one of the stats on the child unit to equal the option count/child unit count (I already have the left side of the equation working - I can set the stat to any value I want, I just can't figure out how to reference the option count).

In case there's a better way to accomplish this, I'm modeling my weapons as child units so that I get detailed stat lines, and I would like to display the number of shots purchased on the weapon itself.
 
At 04:01 PM 2/17/2007, you wrote:
Question 1: An option selects a child unit - is it possible to have the option count be the model count?

Question 2: I would like to set one of the stats on the child unit to equal the option count/child unit count (I already have the left side of the equation working - I can set the stat to any value I want, I just can't figure out how to reference the option count).

In case there's a better way to accomplish this, I'm modeling my weapons as child units so that I get detailed stat lines, and I would like to display the number of shots purchased on the weapon itself.
Since the model count drives most everything else in AB, I don't think there's a reasonable way to have an option selection count drive the model count of a child unit. The only way I can think of is to have options on the weapon that modify the model count of the weapon. So you would need to either move the options to the child units (probably a poor design) or you'd need to have hidden options on the child unit that use live tagexprs based on tags assigned by the parent unit to determine how to modify the model count of the unit. That sounds pretty ugly to setup and manage.

Since all you want to do is display the number of shots purchased, you're probably better off using a quick and dirty solution. Use a script on the child weapon unit to pull the count from a stat on the parent unit and then just modify the NAME of the weapon unit to include that count. This should be easy to do and should yield the same effective result. The only difference is that the count gets put into the name instead of being put into the model count column. And the amount of work is FAR less.

Hope this helps,
Rob
 
Back
Top