Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Army Builder Forums > Army Builder

Notices

Reply
 
Thread Tools Display Modes
shaggai
Senior Member
Volunteer Data File Author
 
Join Date: May 2005
Location: Matawan, NJ, USA
Posts: 159

Old March 15th, 2007, 02: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
harkan
Senior Member
Volunteer Data File Author
 
Join Date: Mar 2005
Posts: 345

Old March 16th, 2007, 11:47 AM
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??
harkan is offline   #2 Reply With Quote
shaggai
Senior Member
Volunteer Data File Author
 
Join Date: May 2005
Location: Matawan, NJ, USA
Posts: 159

Old March 16th, 2007, 07:08 PM
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!!!
shaggai is offline   #3 Reply With Quote
rob
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 8,005

Old March 16th, 2007, 07:12 PM
At 02:23 PM 3/15/2007, you wrote:
Quote:
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?
There is NO way to enforce relationships between two child entities. Due to AB's evaluation sequence, child1 is processed and then child2 is processed. There is NO way for child2 to have any influence on child1, so selecting an option on child1 could block it on child2, but selecting an option on child2 could NOT block it on child1. The only way to resolve and interdependency like this is via the use of rules.

-Rob
rob is offline   #4 Reply With Quote
rob
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 8,005

Old March 16th, 2007, 07:13 PM
At 11:47 AM 3/16/2007, you wrote:
Quote:
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??
The evaluation sequence applies to everything. This includes the assignment sequence of tabs. So the parent could NOT enforce something on child1 based on actions within child2.

-Rob
rob is offline   #5 Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 06:47 AM.


Powered by vBulletin® - Copyright ©2000 - 2019, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.