• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Gauge help

Messages
24
Country
us-pennsylvania
:confused:Hello All:
I am having some difficulties in getting my first xml gauge to work. The gauge that I am making will be similar to the periscope found on the 380 airbus like so: http://www.airbus.com/store/mm_repository/cockpit_airbusA380/flash/cockpit1.htm
At the moment, the bmp's display on the plane after I cab the codes and place it. However the gauge does not work. Can someone tell me what changes that I need to make?
Here is the code for the switch that does switch on and off but does not turn the primary gauge on. So this is what I have so far for my codes:

<Gauge Name="380periscope" Version="1.0">
<!-- start the on and off button -->
<Element>
<Select>
<Value> (L:ThreeEightyPeriscopeSwitch, bool)</Value>
<Case Value="0">
<Image Name="button_off.bmp" UseTransparency="Yes" ImageSizes="54,54"/>
</Case>
<Case Value="1">
<Image Name="button_on.bmp" UseTransparency="Yes" ImageSizes="54,54"/>
</Case>
</Select>
</Element>
<Mouse>
<Area Left="0" Right="54" Top="0" Bottom="54">
<Tooltip ID="380PERISCOPE ON/OFF"/>
<Cursor Type="Hand"/>
<Click>
(L:ThreeEightyPeriscopeSwitch, bool) ! (&gt;L:ThreeEightyPeriscopeSwitch, bool)
</Click>
</Area>
</Mouse>
</Gauge>


Here is the code for the primary gauge:

<Gauge Name="380periscope" Version="1.0">
<Image Name="mainCRtransparent.bmp" />
<Size X="125" Y="171"/>
<!-- ======================= The View =================== -->
<Element>
<Position X="123" Y="169"/>
<CustomDraw Name="fs9view:view" X="123" Y="169" Zoom="5.0" Pitch="0" Bank="0" Heading="0" OffsetUp="10" OffsetForward="-10.0">
<On>(G:Var1) 0 &gt;</On>
<OffsetRight>(G:Var1) 0.00 *</OffsetRight>
</CustomDraw>
</Element>

<!-- ======================= Viewport Window ================== -->
<Element>
<Size X="125" Y="171"/>
<Visible>(A:Circuit general panel on, bool)</Visible>
<Element>
<Visible>(L:ThreeEightyPeriscopeSwitch, bool)</Visible>
<Position X="0" Y="0"/>
<Element>
<Select>
<Value> (L:ThreeEightyPeriscopeSwitch, bool)</Value>
<Case Value="0">
<Image Name="mainCR.bmp" UseTransparency="Yes" />
</Case>
<Case Value="1">
<Image Name="mainCRtransparent.bmp" UseTransparency="Yes" />
</Case>
</Select>
</Element>
</Gauge>

Also, how would I code the primary gauge so it will activate with the switch.
Any relevant Help Welcome
ty Recency
 
Just as a reminder, the fs9view:view will not function unless there is nothing "under" it. IOW, if you have it on a 2d panel, there must be a "hole" in the panel graphics so that it is totally transparent (0,0,0) so the fs9view:view image may be seen...
 
Update:
I have changed the syntax somewhat, so now I have the gauge working. However, it is still not quite what I want.

Here is the syntax for the switch. The switch does seem correct in that it does do what I want it to do, which is to turn the gauge on and off.

<Gauge Name="threeEightyNewSwitchThreePeriscope" Version="1.0">
<Size X="54" Y="54"/>

<!-- on and off Button -->

<!-- ======================= Button ================================ -->
<Element>
<Select>
<Value> (L:ThreeEightyNewSwitchThreePeriscope, bool)</Value>
<Case Value="0">
<Image Name="button_off.bmp" UseTransparency="Yes" ImageSizes="54,54"/>
</Case>
<Case Value="1">
<Image Name="button_on.bmp" UseTransparency="Yes" ImageSizes="54,54"/>
</Case>
</Select>
</Element>

<Mouse>
<Tooltip ID="TOOLTIPTEXT_THREEEIGHTYNEWTHREEPERISCOPE"/>
<Area Left="0" Right="54" Top="0" Bottom="54">
<Cursor Type="Hand"/>
<Click Kind="LeftSingle">
(L:ThreeEightyNewSwitchThreePeriscope, bool) ! (&gt;L:ThreeEightyNewSwitchThreePeriscope, bool)
</Click>
</Area>
</Mouse>
</Gauge>

Ok. here is the code for the periscope view gauge:

<Gauge Name="threeEightyNewThreePeriscope" Version="1.0">
<Size X="125" Y="175"/>
<!-- ======================= The View =========================== -->
<Element>
<Position X="125" Y="171"/>
<Value> (L:ThreeEightyNewSwitchThreePeriscope, bool)</Value>
<CustomDraw Name="fs9view:view" X="122" Y="169" Zoom="1.0" Pitch="0" Bank="0" Heading="0" OffsetUp="10" OffsetForward="-50.0" OffsetRight="0">
<On>(L:ThreeEightyNewSwitchThreePeriscope, bool)</On>
</CustomDraw>
</Element>

<!-- ======================= Viewport Window ===================== -->
<Element>

<Position X="125" Y="171"/>
<MaskImage Name="mainCRtransparent.bmp" ImageSizes="125,171"/>
<Image Name="mainCR.bmp" ImageSizes="125,171"/>
<Value> (L:ThreeEightyNewSwitchThreePeriscope, bool)</Value>
</Element>



<Mouse>
<Tooltip ID="TOOLTIPTEXT_THREEEIGHTYNEWTHREEPERISCOPE"/>
<Area Left="0" Right="120" Top="0" Bottom="165">
<Cursor Type="Hand"/>
<Click Kind="LeftSingle">
(L:ThreeEightyNewSwitchThreePeriscope, bool) ! (&gt;L:ThreeEightyNewSwitchThreePeriscope, bool)
</Click>
</Area>
</Mouse>
</Gauge>

Now. The way that I currently have the obove code will create a view periscope. However there are current problems such as:
1. If I place this guage where you normaly see the mfd, a hole will be created when the gauge is not working. Therefore I need to display a black(#000000)background when the gauge turns off. But how??
Maybe I need a "if" code somewhere?

As of now, Fr Bill and all, I have the gauge hole placed on the lower 2d panel where the outside view does not reach.

2. The other problem is that the view dose not show any plane parts except for the beacon light. In other words the "fs9view:view" seems to be the main 2d view (keyboard=f10).
Nonetheless, from what I can see, I would have to tap into another view such as the views that you get when pressing the "S-key" on the keyboard.
But how??

BTW: I would like thank you guys for the help that you have giving so far.

Recency
 
Update and Still need some help

Hello All:
I have updates my periscope code that does work. I have attached a picture of the periscope.

<Gauge Name="seventysevenPeriscope" Version="1.0">
<Size X="355" Y="339"/>
<!-- ======================= The View =========================== -->
<Element>
<Container/>
<Position X="0" Y="0"/>
<Element>
<Size X="355" Y="339"/>
<Visible>(A:Circuit general panel on, bool)</Visible>
<Element>
<Value> (L:seventysevenSwitchPeriscope, bool)</Value>
<CustomDraw Name="fs9view:view" X="355" Y="339" Zoom="1.0" Pitch="0" Bank="0" Heading="0" OffsetUp="10" OffsetForward="-70.0" OffsetRight="0">
<On>(L:seventysevenSwitchPeriscope, bool)</On>
</CustomDraw>
</Element>

<!-- ======================= Viewport Window ===================== -->
<Element>

<Position X="355" Y="339"/>
<MaskImage Name="PeriscopeTr777.bmp" ImageSizes="355,339"/>
<Image Name="PeriscopeTr777.bmp" ImageSizes="355,339"/>
<Value> (L:seventysevenSwitchPeriscope, bool)</Value>
</Element>
</Element>
</Element>

<Mouse>
<Tooltip ID="TOOLTIPTEXT_SEVENTYSEVENPERISCOPE"/>
<Area Left="0" Right="355" Top="0" Bottom="339">
<Cursor Type="Hand"/>
<Click Kind="LeftSingle">
(L:seventysevenSwitchPeriscope, bool) ! (&gt;L:seventysevenSwitchPeriscope, bool)
</Click>
</Area>
</Mouse>
</Gauge>

However, as you can see the plane is not visable.
So, the questions are, how do I change the view, what codes should I insert to display a different view so the plane will show.
I have attached Event View ID's from the sdk tutor. Is it possible to use one those ID's to change the view? If so, how would I place the ID with the current code?
Any help on this matter welcome.
Recency
 

Attachments

  • 777periscope picture.jpg
    777periscope picture.jpg
    26.3 KB · Views: 725
  • event id.jpg
    event id.jpg
    60.3 KB · Views: 747
<CustomDraw Name="fs9view:view" X="355" Y="339" Zoom="1.0" Pitch="0" Bank="0" Heading="0" OffsetUp="10" OffsetForward="-70.0" OffsetRight="0">

It seems to me that you've got your "viewpoint" 10m above the a/c's default origin, and 70m in front of the aircraft's origin!

BTW, you're making great progress! That looks great so far! :D
 
Back
Top