Dave_Gilbert
Member
I am trying to write a set of files, and I'm running into a problem with one of the requirements.
One of the unit types can carry/possess a number of sub-units.
For example:
unit 1 may be able to carry 1 of sub-unit x, or y, or z, with x as default.
Unit 2 may be able to carry 6 of sub-unit x, y, or z in any combination, with x as default.
I want to be able to set the system up so that n of the default appears when the unit is selected.
If one of the other options is selected then that appears as sub-unit size 1 on the roster, and the default sub-unit is reduced by 1 automatically.
If a sub-unit size reduces to 0 it is removed from the roster, but can be reinstalled (at size 1) by reselecting it.
In this way the "proper" number of sub-units is reatined, and the roster appearance is O.K.
To add to the problems some of the sub-units take up double or triple slots. So in the example above, of Unit 2:
If sub-unit y takes up 3 normal slots, then Unit 2 could have:
6 of x,
2 of y,
6 of z,
or 1 of y + 2 of x + 1 of z.
Any help please?
One of the unit types can carry/possess a number of sub-units.
For example:
unit 1 may be able to carry 1 of sub-unit x, or y, or z, with x as default.
Unit 2 may be able to carry 6 of sub-unit x, y, or z in any combination, with x as default.
I want to be able to set the system up so that n of the default appears when the unit is selected.
If one of the other options is selected then that appears as sub-unit size 1 on the roster, and the default sub-unit is reduced by 1 automatically.
If a sub-unit size reduces to 0 it is removed from the roster, but can be reinstalled (at size 1) by reselecting it.
In this way the "proper" number of sub-units is reatined, and the roster appearance is O.K.
To add to the problems some of the sub-units take up double or triple slots. So in the example above, of Unit 2:
If sub-unit y takes up 3 normal slots, then Unit 2 could have:
6 of x,
2 of y,
6 of z,
or 1 of y + 2 of x + 1 of z.
Any help please?