Junior Member
Join Date: Jul 2008
Posts: 10
|
Carrier wing Validation
I need to make a validation of fighter wings, called Fleet Wings, on any ship that can carry those wings. Rules: Any ship that carries wings has a Fleet Wing rating (FW) That ship can have that number of wings or none. If it does take wings it must have all the same kind of wings. As far as I can tell I need a validation rule that looks at the FW rating of the ship and allows no wings to be a valid condition. It also has to look at the FW rating and have that number of wings as valid. Lastly it has to check the winds added and make sure they are all of the same type. It would be useful if when you added wings it automatically added wings that were equal to the FW rating. Here is the link to a minimal set of rules that anyone can download to help me with this. http://www.theblackocean.com/resourc...estormtest.zip Thank you for your help! |
#1 |
Senior Member
Volunteer Data File Author
Join Date: May 2005
Location: Grenoble, France
Posts: 167
|
Hello,
If I understand your need, the ship can have 0 or its Fleet Wing rating number of the same type of wings. Did you try an option with Incr and size min/max settings ? For this : 1. Create a group wingsNb with tags:1, 2, 3, 4, ... 2. Create an option with EVAL Script: var val as number var sel as string sel = "wingsNb." & selection val = unit.assignstr[sel] SIZE Script: @minimum = tagvalue[wingsNb.?] @maximum = tagvalue[wingsNb.?] with a CANDIDATE script filled with the wings type and * in child entity. 3. Link the option to every ship with both Incr and Max set to the Fleet Wing rating. Quote:
Quote:
Quote:
The user can choose only one type of wings, and it is automaticaly set to the Fleet Wing rating number. NOTE : If you can have 0, 1, 2, ..., Fleet Wing rating wings, just remove the Incr from the previous template. Hope This helps, Frédéric |
|||
#2 |
|
|