- Messages
- 10,163
- Country

Hey guys,
I have a unique issue going on.
I am making a fuel gauge that uses graphics depicting a fuel cell in various 'amounts' of filled, such as half filled, 5/8 filled, etc.
I am using (A:FUEL TANK RIGHT MAIN QUANTITY,percent) but it doesnt work. If I use 'gallon' (which the SDK points to it requiring), then I get it working when it is in 'separated script blocks' (Element/Visible for each one, 27 total for all three tanks). But, the system will not accept decimals. So, there is a conflict when at gallon meet points, where one that shares 5 gallons, to the next that uses range 5 7 (5 to 7 gallons rng) that too will show the lower (bottom of the two in the scripts stack), thus a full tank denotes 7/8 tank.
So, I wanted to organize it into a nice 'case' block script. But, I cannot figure out how to code the function. I tried using percent again, and used min 0 max 8 near, I tried gallons in the case values, each, (I just wanted to see if it would work, didnt.. ), and a few other ways.
Anyone have an idea as to how to get this baby to function? I know, percent will not work with min 0 max 8. It is in the middle of various changes. It was just at gallon with min 0 max 26.
I have a unique issue going on.
I am making a fuel gauge that uses graphics depicting a fuel cell in various 'amounts' of filled, such as half filled, 5/8 filled, etc.
I am using (A:FUEL TANK RIGHT MAIN QUANTITY,percent) but it doesnt work. If I use 'gallon' (which the SDK points to it requiring), then I get it working when it is in 'separated script blocks' (Element/Visible for each one, 27 total for all three tanks). But, the system will not accept decimals. So, there is a conflict when at gallon meet points, where one that shares 5 gallons, to the next that uses range 5 7 (5 to 7 gallons rng) that too will show the lower (bottom of the two in the scripts stack), thus a full tank denotes 7/8 tank.
So, I wanted to organize it into a nice 'case' block script. But, I cannot figure out how to code the function. I tried using percent again, and used min 0 max 8 near, I tried gallons in the case values, each, (I just wanted to see if it would work, didnt.. ), and a few other ways.
Anyone have an idea as to how to get this baby to function? I know, percent will not work with min 0 max 8. It is in the middle of various changes. It was just at gallon with min 0 max 26.
Code:
<Element>
<Position X="1164" Y="390"/>
<Select>
<Value>(A:FUEL TANK RIGHT MAIN QUANTITY,percent) min 0 max 8</Value>
<Case Value="0">
<Image Name="BatteryEmpty.bmp" ImageSizes="163,56" />
</Case>
<Case Value="1">
<Image Name="Battery125.bmp" ImageSizes="163,56" />
</Case>
<Case Value="2">
<Image Name="Battery250.bmp" ImageSizes="163,56" />
</Case>
<Case Value="3">
<Image Name="Battery375.bmp" ImageSizes="163,56" />
</Case>
<Case Value="4">
<Image Name="Battery500.bmp" ImageSizes="163,56" />
</Case>
<Case Value="5">
<Image Name="Battery625.bmp" ImageSizes="163,56" />
</Case>
<Case Value="6">
<Image Name="Battery750.bmp" ImageSizes="163,56" />
</Case>
<Case Value="7">
<Image Name="Battery875.bmp" ImageSizes="163,56" />
</Case>
<Case Value="8">
<Image Name="BatteryFull.bmp" ImageSizes="163,56" />
</Case>
</Select>
</Element>
