Another question:
When you click on the navigation mode knob, does the navigation mode knob also function/change position as well as the GPU? or does it fail to function?
Unfortunately I can't claim to understand what's going on here. I've had somewhat similar difficulties with <visibility> Lvars (which, unlike <animation> variables, get loaded as indices rather than strings) - but only on models and DLLs whose lifetime extends beyond that of the user vehicle. I'm still tempted to think that it may be something outside of the sim itself (i.e. in your gauge - something like the ID of the nav mode knob having a scope issue or something. But if that's done in xml, then probably that's not it...) But I'm very curious and will run some tests of my own and see if I can duplicate the issue.
In my own experience I have not found the zero index to be inherently problematic - it's only become "problematic" when it revealed my use of other unregistered (therefore still 0) Lvar indices. However, if that's incorrect, then something which could solve your immediate problem, albeit in an ugly way, would be to put an un-evaluated "dummy" Lvar in the visibility script ahead of the GPU L var. Something like:
(L:zeroIndexedLvar,bool) (L:GPU_visible,bool)
Or if the sim is smart enough to ignore the unreferenced variable (which I highly doubt) then something like:
(L:zeroIndexedLvar,bool) 0 * (L:GPU_visible,bool) or
The idea being that the unused "zeroIndexedLvar" gets assigned to the problematic zero index, and "GPU_visible" gets shifted to 1.
If they're switched, then:
(L:GPU_visible,bool) (L:zeroIndexedLvar,bool) 0 * or
You get the point. It's ugly - and any change to the modeldef and/or model is likely to break it. But it's the only thing I can think of at the moment. Let me know if you figure it out - after my own battles with the L:var system for the SimWorks carriers, I (apparently wrongly) thought I had it 100% nailed down, so I'm very curious about this one...
Anyway, that's a lot of talk for practically no actual help. My apologies.
Farley
P.S. There are a couple other things you can try, which also may possibly shed some light:
1) Try Re-registering the nav mode and GPU Lvars every time you use them.
2) Try setting them using execute_calculator_code() with 1 or 0 as part of the string.