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

FSX 3d XML Script for GPS control

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
Good grief, but this 3d XML script for GPS control is a stone-cold PITA!

After finally managing to get it working (sort of), now I find that some of the key_events are either screwed up, or simply don't work at all...

For example, here's what should be pretty straight forward:

Code:
  <PartInfo>
    <Name>GPS2_PageKnob</Name>
    <MouseRect>
      <Cursor>Hand</Cursor>
      <TooltipText>Page Knob</TooltipText>
      <MouseFlags>LeftSingle+RightSingle+Wheel</MouseFlags>
      <CallbackCode>
        (M:Event) 'LeftSingle'  scmi 0 == if{ (>K:G1000_MFD_PAGE_KNOB_DEC) }
        (M:Event) 'RightSingle' scmi 0 == if{ (>K:G1000_MFD_PAGE_KNOB_INC) }
        (M:Event) 'WheelUp'     scmi 0 == if{ (>K:G1000_MFD_PAGE_KNOB_INC) }
        (M:Event) 'WheelDown'   scmi 0 == if{ (>K:G1000_MFD_PAGE_KNOB_DEC) }
      </CallbackCode>
    </MouseRect>
  </PartInfo>

Should work, right? Nope! the pages will increase with no problem, but the DECREASE simply doesn't work! :banghead:

Okay, how about the Flight Plan? This you would expect to display the Flight Plan page, right?
Code:
  <PartInfo>
    <Name>GPS2_FPL_BUTTON</Name>
    <MouseRect>
      <Cursor>Hand</Cursor>
      <TooltipText>Flight Plan</TooltipText>
      <CallbackCode>(>K:G1000_MFD_FLIGHTPLAN_BUTTON)</CallbackCode>
    </MouseRect>
  </PartInfo>

Oh no! It turns on the TERRAIN color display!

These are completely broken. They do nothing at all:

G1000_MFD_MSG_BUTTON
G1000_MFD_OBS_BUTTON
 
Hi Bill
Try using wheelup wheeldown rather than wheel if you just use wheel it sometimes only moves in one direction in fsx
then again it wouldnt stop the left right button from working :)
also do a search in the default modeldef for scmi the example code use a slightly different syntax admittedly its so you can use drag mouse
but it might point you in the right direction why its not working


Wozza
 
Last edited:
Hmmm... Let's see now.

The only difference between scmp and scmi is that the latter ignores case...

I've already tried WheelUp and WheelDown in the <MouseFlags> list. Makes no difference whatever, and you're correct that still doesn't explain why the left-click (decrease) won't work at all.

I'm going to try splitting the knob in half horizontally and have two separate mouse areas: one for left-click/mouse down, and the other right-click/mouse up and see what happens.

It may well turn out that some of these key_events simply never worked when using the FS9 XML schema, and were fixed in the FSX XML schema. Since I've never tried this before, I simply wouldn't know if this were the case.

Odd too that the terrain button toggles the flightplan page, and the flightplan button toggles the color terrain! :eek:
 
Back
Top