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

FSXA XML: compound events trapping?

Messages
204
Country
portugal
Hi.

Suppose I want to know when a cargo door is toggled...

How can I trap a compound event such as TOGGLE_AIRCRAFT_EXIT followed by SELECT_2?
 
If you use bool as the unit and its greater than 0 then its toggled ;)
as I said simple solution :)
A:EXIT OPEN:index units is percent over 100, which means a value between 0 and 1, and it takes about 5 or 6 seconds to go from 0.00 to 1.00 and vice-versa.

Now suppose the cargo door is open:
(A:EXIT OPEN:1, percent over 100) is greater than 0, but the event might not have been toggled...

Besides, being (A:EXIT OPEN:1, percent over 100) greater than zero, the cargo door can be steady open, opening, or closing...

The (A:EXIT OPEN:1, percent over 100) 1 == condition can at least tell it is open, as you said...

Maybe something like
Code:
(A:EXIT OPEN:1,  percent over 100) 1 <
(A:EXIT OPEN:1,  percent over 100) 0 > &&
Can tell us the cargo door is moving, so it must have been toogled.

But I was wondering if we could realy trap the compound event TOGGLE_AIRCRAFT_EXIT followed by SELECT_2 itself
 
Hi
you could also try (A:CANOPY OPEN:1,bool) this will give you an output of 0 closed 1 fully open, use a in range tag applied to an L:var and use the L:var as your trap event...this should get you close......In theory :)
But not knowing what your intended use is its all just conjecture on my part ;)
 


But I was wondering if we could realy trap the compound event TOGGLE_AIRCRAFT_EXIT followed by SELECT_2 itself


What you can do in XML is to trap both events and use a local var to link them in a unique status. Unfortunately, this will work in panel (2D and VC) views exclusively; only the EventHandler in C can trap from any view.
I guess reading (A:EXIT OPEN:n, percent over 100) can be more simple and give almost the same result.

Tom
 
What you can do in XML is to trap both events and use a local var to link them in a unique status(...)
I got to that point and manage to trap the two events one after another, and it worked... except that I wasn't able to prevent the trap of the same sequence in the inverse order... :( so I quit there, and revert to the more simple A var monitoring... thank you all.
 
Back
Top