XMhell

A quiet place for budding model makers to share thoughts, get answers to questions and request and share references.

Moderators: Guru's, The Ministry

Post Reply
Paule
Comet
Comet
Posts: 165
Joined: 17 Oct 2005, 15:28
Location: NE Lincs

XMhell

Post 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

User avatar
hinch
VC10
VC10
Posts: 534
Joined: 24 Aug 2006, 01:34
Contact:

Post by hinch »

hi paule - why not paste your code so far here and we'll debug it ;)

Paule
Comet
Comet
Posts: 165
Joined: 17 Oct 2005, 15:28
Location: NE Lincs

XMhell

Post 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

Paule
Comet
Comet
Posts: 165
Joined: 17 Oct 2005, 15:28
Location: NE Lincs

XMhell

Post 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

User avatar
hinch
VC10
VC10
Posts: 534
Joined: 24 Aug 2006, 01:34
Contact:

Re: XMhell

Post 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.

Post Reply