Page 2 of 2

Re: XML gauge code woes

Posted: 28 Oct 2009, 15:25
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

Re: XML gauge code woes

Posted: 28 Oct 2009, 21:07
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:

Re: XML gauge code woes

Posted: 29 Oct 2009, 18:23
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.

Re: XML gauge code woes

Posted: 29 Oct 2009, 18:51
by delticbob
Cheers Ted, I'll save those links.

A little light reading for the weekend :tunes:

Bob