[jhb_airlines] Re: FSX XML Gauges

  • From: "Bones" <bones@xxxxxxx>
  • To: <jhb_airlines@xxxxxxxxxxxxx>
  • Date: Sun, 5 Nov 2006 15:36:15 -0000

Switches in FS are a pain once you move away from the simple on/off variety
that can get triggered by the basic Toggle function. When you move to multi
position switches you find the default code in FS isn't friendly towards
custom design. Try replacing the linear flap lever in an aircraft by a
simple rocker switch and you'll see what I mean!
That is why many levers in FS are bar strip design - flaps, gear, fuel etc.
The code only allows you to step through the various settings rather than go
direct to a value. In my case a simple fuel selector that has two levers,
one for left tank off, aux and full and one for right tank off, aux and full
has been a real headache.

-----Original Message-----
From: jhb_airlines-bounce@xxxxxxxxxxxxx
[mailto:jhb_airlines-bounce@xxxxxxxxxxxxx] On Behalf Of FrankTurley@xxxxxxx
Sent: 05 November 2006 08:57
To: jhb_airlines@xxxxxxxxxxxxx
Subject: [jhb_airlines] FSX XML Gauges

I've just come across what I think must be a limitation in the XML language,
or at least in its FSX implementation.
Take the simple example of a switch -
I am allowed to use Select - Case for a text box or an image, so I can do
something like -
Select case expression (Switch, Bool)
 Case 0 - Display Off Switch
 Case 1 - Display On Switch
However, when it comes to mouse functions, I can't use the select case
function, so instead of putting the mouse action within the Select Case
block as above (which I think is the logical place for it), to toggle the
switch I have set the mouse action script to something like -
If (Switch is off) then (Set switch to on) else (Set switch to off)
Not so bad if you only need one level of detection and action, but gets much
more complex if you are trying to do something more complicated, like detect
other settings and take alternative actions dependant on those. I guess what
I need is an XML script compiler!
Frank T.

Other related posts: