Okay, I've got each of the options assigning a different value to the
first of three stats. The three tables are in three different priority
categories (1,3,and 5), and there are two calc options set to priority 2
and 4. Everything is working fine except the validation. I'm using the
following external unit attribute:
lcmp:expr1[>|>=|=|<=|<]expr2{-msg=msg}{#when}{#mode}{#legal}
but it doesn't say how I can determine if two expressions are not equal to
each other, and the couple I tried haven't worked (ie, !(stat1=stat2),
(stat1<>stat2), and (stat1!=stat2)). Any suggestions?
Thanks again for your help... this is so close to working!
Mark
--- Colen McAlister <colen@wolflair.com> wrote:
> At 04:40 PM 5/1/2003 -0700, you wrote:
> >Unfortunately, it's both from the same source. I've got a unit that
> can
> >take up to three options (out of lets say 12). The unit can have any 3
> it
> >wants, but they can't be the same.
> >
> >Now, to make things easy (or at least less cluttered), I've put the ten
> >options into tables, so the user simply has to click each table over to
> >the option he wants and he's done. The problem with this of course is
> >that it allows the user to select an option three times (once for each
> >table).
> >
> >I didn't think there was a way of limiting the number of times an
> option
> >is taken within a unit so I'm trying to figure out a way to do it with
> >types.
>
> After a long discussion involving complex mathematics here at Lone Wolf
> HQ,
> we have discerned a solution to your problem. It involves using three
> hidden stats.
>
> Let's say you have 10 possible options in your three tables - opt1,
> opt2,
> opt3, opt4, opt5, etc etc etc. opt1 should set stat1 to the value '1'
> (note
> that it sets the stat value, not adds to it). opt2 should set stat1 to
> the
> value 2. Opt3 should set stat1 to the value 3. And so on, until opt10
> sets
> stat1 to the value 10.
>
> You'll also need 5 option categories. Table1 should be category 1;
> Table2
> should be category 3; Table3 should be category 5. (Categories 1 through
> 5
> should be placed such that options from category 1 should be evaluated
> before options from all other categories, category 2 should be evaluated
>
> next, etc.)
>
> Now make two other options. Option Calc1 should be priority 2, so it is
> evaluated after Table1, but before Table2. Calc1 should set the value of
>
> Stat2 to Stat1. Similarly, option Calc2 should be priority 4, so it is
> evaluated after Table2, but before Table3. Calc2 should set the value of
>
> Stat3 to Stat1.
>
> In case it isn't entirely clear what this will do, let's go through the
> sequence of what happens.
>
> At the start, stat1, stat2 and stat3 are all 0. Table 1 has option 1
> selected, table 2 option 7 and table 3 option 1.
>
> Table1 is evaluated first. Option1 sets stat1 to 1.
> stat1 = 1
> stat2 = 0
> stat3 = 0
>
> Now Calc1 sets stat2 to stat1.
> stat1 = 1
> stat2 = 1
> stat3 = 0
>
> Now table2 is evaluated. Option7 sets stat1 to 7.
> stat1 = 7
> stat2 = 1
> stat3 = 0
>
> Now calc2 sets stat3 to stat1.
> stat1 = 7
> stat2 = 1
> stat3 = 7
>
> Finally table3 is evaluated. Option1 sets stat1 to 1.
> stat1 = 1
> stat2 = 1
> stat3 = 7
>
> Now all you have to do is use lcmp to compare the stats. If any two
> stats
> are the same, and they are not zero, then an option has been selected
> multiple times and you should show a validation error.
>
> Hope this helps. This email was brought to you by the number 12 and the
> letter 's'.
>
>
> --
> Colen McAlister (colen@wolflair.com)
> Lone Wolf Development
>
www.wolflair.com
>
>
>
> To unsubscribe from this group, email
>
>
armybuilder-unsubscribe@yahoogroups.com
>
> Your use of Yahoo! Groups is subject to
>
http://docs.yahoo.com/info/terms/
>
>
=====
Warhammer Club - Vancouver, BC
http://www.WCP-Vancouver.com
__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Rent DVDs Online - Over 14,500 titles.
No Late Fees & Free Shipping.
Try Netflix for FREE!
http://us.click.yahoo.com/YoVfrB/XP.FAA/uetFAA/IMSolB/TM
---------------------------------------------------------------------~->
To unsubscribe from this group, email
armybuilder-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/