Junior Member
Join Date: Aug 2005
Posts: 19
|
I have a list that allows the user to select additional upgrade units to add to the original squad (via the Guard.Upgrade tag). However each additional unit should only be selected once for each parent unit - is there a way to remove a unit from the list once it has been selected?
|
#1 |
Junior Member
Join Date: Aug 2005
Posts: 19
|
So far I have limited the options via separate exclusion rules for each item, but this is generating a lot of unnecessary rules - I'd like a simpler way of doing this!
|
#2 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 8,232
|
There is currently no good way to accomplish that. The proper solution is to use a validation rule that complains if an entity from the list has been added more than one.
I've put this on the todo list, so we'll see about adding it at some point in the future. -Rob At 06:29 AM 4/3/2006, you wrote: Quote:
|
|
#3 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 8,232
|
Oops. Based on this post, maybe I misunderstood what you were asking. Please give me a concrete description of how things need to work for the game system. Then I'll know what you're really describing and be able to give you a concrete answer.
-Rob At 04:41 PM 4/3/2006, you wrote: Quote:
|
|
#4 |
Junior Member
Join Date: Aug 2005
Posts: 19
|
Ok, the squads for this army are broken into 4 types: Companies, Formations and Upgrades
For every Company, 2 Formations are allowed. This I've sorted with a validation rule. Also each Company has access to up to 3 Upgrades, which are added to the Company, rather than operating as separate squads. I set up an Exclusion rule on a New Link so that the link deactivates after 3 selections. The New Link generates a list where all the available Upgrades can be selected. However each upgrade should only be selected once. I have had to use a different Exclusion rule for all of the Upgrade units so that an error is generated whenever the user tries to select 2 of the same Upgrade. I was asking if there was a simpler way of doing this? Or are the Exclusion rules the way to go? |
#5 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 8,232
|
Thanks for the explanation. I think there is much easier way of doing this than a bunch of different exclusion groups. Since the limit is for one of each, you can have each of the options assign a different tag to the entity. Make sure all the tags belong to their own group OR just make sure all of them share the same id prefix so that you can use wildcards on them. You can then write a single rule with "entity" scope (or "unit") that compares the total number of tags versus the total number of distinct tags. For the tag expression, simply use the wildcard specification to include all of them from the group.
The net result is a single extra tag for each option and a single rule that detects any use of duplicates. I think this approach is much easier than different exclusion groups and exclusion references for each possible option. Hope this helps, Rob At 06:34 AM 4/4/2006, you wrote: Quote:
|
|
#6 |
Junior Member
Join Date: Aug 2005
Posts: 19
|
OK thanks for that I'll try it!
|
#7 |
|
|