View Single Post
shaggai
Senior Member
Volunteer Data File Author
 
Join Date: May 2005
Location: Matawan, NJ, USA
Posts: 158

Old March 15th, 2007, 01:23 PM
Using exclusions and the following scripts allows for a parent unit to take an option and a child to take an option, but both can only take the option x number of times.

script for parent post-link:
~ Removes option for singular items from child unit
if (usage[smHeavy01] = 1) then
child[unit:daSargeDWT].option[smAssaultC].enablement = 0
child[unit:daSargeDWT].option[smHeavyFla].enablement = 0
endif

script for child post-link:
~ Removes option for singular items from parent unit
if (usage[smHeavy01] = 1) then
parent.option[smAssaultC].enablement = 0
parent.option[smHeavyFla].enablement = 0
endif

So that if the parent takes either [smAssaultC] or [smHeavyFla] the children cannot. Note that the options for the above choices have the [smHeavy01] exclusion (and it has a min of 0 and a max of 1).

Now what I would like to know is that if something can work like this, but only between multiple children of a parent unit, especially where the parent unit does not have the option available - only the children do?

That is, if a parent can choose multiple childen, and each of those children has an option that can only be taken two times between them how would I word the scripts so that either of the children can take the option up to a maximum of 2 time or once each?
shaggai is offline   #1 Reply With Quote