Page 1 of 1
XMhell
Posted: 14 Jan 2007, 14:21
by Paule
Heeeellllp. I'm trying to write a small gauge in xml before going on to code a fuel transfer switch.
There are only 6 lines of code and a bitmap, surely I could manage that for my first attempt. No such luck!
Can some one write me code for a gauge that just creates one L var to store a number. One click on a bitmap stores the value 10 in an L var with number units.
Hope this makes sense.
Paul
Posted: 14 Jan 2007, 15:49
by hinch
hi paule - why not paste your code so far here and we'll debug it

XMhell
Posted: 14 Jan 2007, 16:03
by Paule
Made a copy in plain text, the element tag was my most recent failed brainwave.
<Gauge Name="CentrTransfer" Version="3.0">
<Image Name="TransfSwitchBase.bmp"/>
<Mouse>
<Tooltip>Centre Tank Transfer Pump</Tooltip>
<Cursor Type="Hand"/>
<Element>
<Click>6(>L:fuel_source_0,number)
5(>L:fuel_target_0,number)
1200(>L:fuel_rate_0,number)</Click>
</Element>
</Mouse>
</Gauge>
I have a test gauge which will show the values produced. It indicates that my L var values never get stored.
Paul
XMhell
Posted: 14 Jan 2007, 22:38
by Paule
Solved!
Seems you need 3 spaces between the value for storage and the opening bracket. Is the xml syntax for FS9 documented anywhere.
B silly language, fink I'll go to back to Pascal, C and Vis Bas. At least then I have some idea of what I'm doing.
Paul
Re: XMhell
Posted: 14 Jan 2007, 23:13
by hinch
Paule wrote:Solved!
Seems you need 3 spaces between the value for storage and the opening bracket. Is the xml syntax for FS9 documented anywhere.
B silly language, fink I'll go to back to Pascal, C and Vis Bas. At least then I have some idea of what I'm doing.
Paul
xml is dependent on who wrote the tags! a lot of it is covered in the gauge creation SDK:
http://www.microsoft.com/games/flightsi ... ds_sdk.asp
though it isn't exactly straight forward reading it does have a big list of values that can be read in the sim.