• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Statcalcs

harkan

Well-known member
Overview first: in the IG armoured company list you can select a number of doctrines for each vehicle. Within the list the elite and HQ uints are command tanks and tank aces. There is a special rule called Aces High which states that command and ace tanks must have at least as many points spent on doctrines as any other tank.

In the file when a doctrine is selected the points value is added to a unit stat so each can be tracked per unit.

A statcalc checks ace and command tanks finds the highest value of this stat
Another checks the highest other unit and finds the highest value for this stat

What I need is for another statcalc to find the lowest value for this stat for command and elite tanks that is not zero. The rule can then compare the two and flag this as an error.

The prob is the lowest value statcalc always seems to return zero regardless, the others work fine - I have changed the priority of the statcalc to as low as poss but it still does the same thing. Any ideas??
 
doh sorry!! Have changed the statcalc that looks for the lowest value so it compares against the highest statcalc instead of @value, also changed the statcalcs so they refer to the runtime tag value of the stat instead of the stat directly - seems to have worked now :)
 
That doesn't sound like the best solution to me. You ought to be able to use "@value" without any problems. I'm guessing that the problem is the INITIAL value of the statcalc, which is always zero by default. For a minimum test, that won't work. You'll need to set the initial value to something very large (e.g. 10000). After that, the same logic as for the maximum ought to work fine, except for doing a "less than" comparison. I'm guessing you're currently doing the "less than" with the default initial value of zero, so you always get zero.

Hope this helps,
Rob

At 01:25 PM 2/2/2006, you wrote:

doh sorry!! Have changed the statcalc that looks for the lowest value so it compares against the highest statcalc instead of @value, also changed the statcalcs so they refer to the runtime tag value of the stat instead of the stat directly - seems to have worked now
icon_smile.gif
 
Back
Top