Senior Member
Volunteer Data File Author
Join Date: May 2005
Location: Matawan, NJ, USA
Posts: 158
|
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? |
#1 |
Senior Member
Volunteer Data File Author
Join Date: Mar 2005
Posts: 345
|
is it worth running it of tags??
The option tags the parent and a rule checks at unit level to see if there are more than two tags set, if more than two are found then flag up an error?? |
#2 |
Senior Member
Volunteer Data File Author
Join Date: May 2005
Location: Matawan, NJ, USA
Posts: 158
|
I might have to go the tags/rule route. I thought the above worked correctly - but started to reach a point where I found it was not working as I had originally expected.
CASH FOR THE CASH GOD!!! MORE COINS!!! MORE COINS!!! |
#3 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 8,232
|
At 02:23 PM 3/15/2007, you wrote:
Quote:
-Rob |
|
#4 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 8,232
|
At 11:47 AM 3/16/2007, you wrote:
Quote:
-Rob |
|
#5 |
Thread Tools | |
Display Modes | |
|
|