XML gauge code woes

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

Moderators: Guru's, The Ministry

User avatar
Viscount Cornbank
The Gurus
Posts: 1119
Joined: 29 Jun 2004, 12:29
Location: Cornbank House, rural Scotland

Re: XML gauge code woes

Post by Viscount Cornbank »

Hi Bob

You could add some processing code to return the switch to the correct position if the keyboard is used. M$ don't provide us with a variable for a wingfold control, hence the problem.

I've tried this on the swingtail and it works, but the switch won't move until the operation (ie wingfold) is complete, which on the swingtail takes about 30 seconds. I imagine the parachute deployment will be almost instant, so the switch will move much more quickly. ;)

<Element>
<Select>
<Value>(A:Folding Wing Left Percent,percent) 0 == (L:Brake_Parachute_Switch, number) 1 == && if{ 0 (>L:Brake_Parachute_Switch, number) } els{ (A:Folding Wing Left Percent,percent) 100 == (L:Brake_Parachute_Switch, number) 0 == && if{ 1 (>L:Brake_Parachute_Switch, number) } }</Value>
</Select>
</Element>


cheers

Fraser
Image

delticbob
Concorde
Concorde
Posts: 682
Joined: 19 Aug 2005, 19:15
Location: Doncaster. UK

Re: XML gauge code woes

Post by delticbob »

Hush :welldone: Don't upset it, but I've got it working.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

edit, from Wednesday evenings post.

He is the code I have used for the switch. Be it right, (or otherwise), it does the biz.

<Gauge Name="Vulcan_Tail_Chute" Version="1.0">
<Element>
<Position X="0" Y="0"/>
<Select>
<Value>(L:Brake_Parachute_Switch,bool)</Value>
<Case Value="0">
<Image Name="Toggle_Switch_2.bmp"/>
</Case>
<Case Value="1">
<Image Name="Toggle_Switch_1.bmp"/>
</Case>
</Select>
</Element>
<Element>
<Select>
<Value>(A:Folding Wing Left Percent,percent) 0 == (L:Brake_Parachute_Switch, number) 1 == && if{ 0 (>L:Brake_Parachute_Switch, number) } els{ (A:Folding Wing Left Percent,percent) 100 == (L:Brake_Parachute_Switch, number) 0 == && if{ 1 (>L:Brake_Parachute_Switch, number) } }</Value>
</Select>
</Element>
<Mouse>
<Cursor Type="Hand"/>
<Click>(L:Brake_Parachute_Switch,bool) ! d (>L:Brake_Parachute_Switch,bool) 1 == (A:Folding Wing Left Percent,percent) 1 < &&

if{ (>K:TOGGLE_WING_FOLD) } (L:Brake_Parachute_Switch,bool) 0 == (A:Folding Wing Left Percent,percent) 1 > &&

if{ (>K:TOGGLE_WING_FOLD) }

</Click>
<Tooltip>Brake Parachute</Tooltip>
</Mouse>
<Key>
<Cursor Type="key"/>
<Click>(L:Brake_Parachute_Switch,bool) ! d (>L:Brake_Parachute_Switch,bool) 1 == (A:Folding Wing Left Percent,percent) 1 < &&

if{ (>K:TOGGLE_WING_FOLD) } (L:Brake_Parachute_Switch,bool) 0 == (A:Folding Wing Left Percent,percent) 1 > &&

if{ (>K:TOGGLE_WING_FOLD) }

</Click>
<Tooltip>Brake Parachute</Tooltip>
</Key>
</Gauge>


Also a couple of bmps of what I am doing, (to the PSS/JF Vulcan panel), & I do admit - it is work in progress & I have yet to progress the co-pilot position, that's why there is a difference, plus I am still pondering over the use of the Attitude Indicator & HSI. The Garmin unit is a picture of the real thing, but FS does not have one so its just for show.

Image

Image

finally a really naff bit of video showing the switch in action with the chute - don't blink or you'll it :Dance:

Image


But again my thanks to Fraser & Ted, who between them have helped me through, but I have no idea what I'm doing.

Bob :cheers:
I can fly now with my fantastic new PC

tedcook
Chipmunk
Chipmunk
Posts: 4
Joined: 15 Dec 2007, 14:23
Location: Stoke on Trent, England.
Contact:

Re: XML gauge code woes

Post by tedcook »

Bob

Try these references to get you started.

-----------------
For a good reference list by Arne Bartels

http://www.flightsim.com/

Go to the library and search for xmlgau01.zip .
-------------------
Nick Pike has lots of help at:-

http://fs2x.com/

Go to... Tutorial\Tutorial1\Section1 Download chapters 1,2 and 3.
Also look in the XML Reference list.
-------------------
http://www.scenery.org/tutorials_fs2k4_SDK.htm

for the FS2004 SDKs
--------------------

Regards, Ted.

delticbob
Concorde
Concorde
Posts: 682
Joined: 19 Aug 2005, 19:15
Location: Doncaster. UK

Re: XML gauge code woes

Post by delticbob »

Cheers Ted, I'll save those links.

A little light reading for the weekend :tunes:

Bob
I can fly now with my fantastic new PC

Post Reply