• 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 Connecting Gauges to Simconnect.. Can I?

Hi Virtuali! I was hoping you would join this discussion

So, we almost came full circle - we were asking the exact same question re: V: Vars in this thread ... Perhaps we can get to the bottom of this. Tim?

As far as the L: vars - That was the premise we were going on, as it seemed the most logical one. I didn't get a chance to test this during the weekend, but I'll get on it ASAP. I intend to design a few simple objects with L:OpenHangarDoor anim, and when I trigger it through a simple globally placed DLL gauge (as in, defined in DLL.xml, as opposed to panel), I expect it to trigger doors of ALL of the hangars.

Edit: I just read Bill's post - I guess I'll be just confirming your findings, Bill! :)

Furthermore, it would be REALLY useful to have subsets of the variables used on various SimObject classes, the simplest one being SimpleObject. I agree on the hackery bit, it's workable.

Right now, we can get away with controlling multiple animations on any SimObject (well, perhaps GroundVehicle at the least) by "hijacking" f_canopy (or, door_0,... ) and a few others and sending events to trigger those. This needs only a SimConnect dll (no gauge), and the reason I "hang on" to SimConnect is that you could dynamically place AI object, whereas I don't think Gauge API will let you do that. This way, you could write a small XML script that SimConnect app could read in, and place "dynamic" hangars (or any other dymamic object) where you need them.

Misho
 
Last edited:
I've never even considered V:vars at all, but even so wouldn't they behave the same way as L:vars?

They are surely local to every object.

You can have several baggage loaders visible at the same time, servicing both AI and the user airplane, and the loaders can animate their arm independently.
 
For my FollowMe car I also hijack/multiplex a var to control the sign and indicator lights, but that BagageLoaderArm is still intriguing me.

Yet giving the fact that the bagage loader and tug have been hardcoded into FSX I fear that this is also something that can't be controlled. I think so because the angle of the loader does depend on two variables (angle + which plane it belongs to) and only one can be set through the V: var.

By the way, is there some list of what is simulated/available for what category (like GroundVehicle, SimpleObject, Viewer, ...)?

Daniel
 
Hi Daniel,

Yeah I've been aking for the variable list as well... By multiplexing you mean bit masking, right? Do you have a good, fat :D, docile and "unused" var that is working with SimpleObject that would be ripe for multiplexing? It seems to be the best option so far.

Another thing that's intriguing me is the Custom Events, as mentioned in SDK. I asked Tim (Beatle) about this but no answer so far. SDK Quote:

"The ability to export custom event IDs in a model, so that the IDs can be referenced in the panel system or in a SimConnect client, has been added."

Misho
 
I haven't used SimpleObjects, can't help you there.

As far as groundvehicles go, I have been playing with the lights. Trying to find out which switch will turn on which lights. I have to test it again because I was sending the event to early. Yet so far I have found one thing that works:

- Define the light with 1 (beacon according to the sdk)
- Map an event to "ALL_LIGHTS_TOGGLE"
- Sending the event will turn on the lights for the GroundVehicle

And:

- Adding the event to a notification group will make you receive an event when the user presses 'L' or the key that is mapped to the ALL_LIGHTS_TOGGLE event.

"The ability to export custom event IDs in a model, so that the IDs can be referenced in the panel system or in a SimConnect client, has been added."

I definitely have to just try that to see if it works. Unfortunately my project uses a simconnect exe and I expect that it will only work with a DLL inside the FSX process that exports the required data.

Edit:

The same thing is also described like this:

"Custom Event Support: Ability to identify and export custom event IDs in a Virtual Cockpit model, and then the ability to reference those IDs via the panel system or SimConnect add-on to drive custom functionality. " here.

It sounds slightly less promising formulated that way.


Daniel
 
Last edited:
Daniel,

"Custom Event Support: Ability to identify and export custom event IDs in a Virtual Cockpit model, and then the ability to reference those IDs via the panel system or SimConnect add-on to drive custom functionality. " here.

It sounds slightly less promising formulated that way.

Yeah, with that "Virtual Cockpit" caveat... grrr.

I've tried using custom events to send notifications to SimConnect DLL, but I got nothing. Here is the thread that describes what I did - If you don't mind, please have a look at the code and let me know if I missed something.

Also - I was wondering (Bill?) if it is possible to combine <EventID> and <CallbackCode> blocks in <MouseRect>? They appear to be mutually exclusive. I know what their function is - if <EventID> is present, then the FSX is notified to execute the code for this event internally. If <CallbackCode> is present, then the code is calculated on the spot. The problem is, with custom events, there is seemingly no way to execute any code because <CallbackCode> block appears not to be recognized if <EventID> is present.

Misho
 
Last edited:
Also - I was wondering (Bill?) if it is possible to combine <EventID> and <CallbackCode> blocks in <MouseRect>? They appear to be mutually exclusive. I know what their function is - if <EventID> is present, then the FSX is notified to execute the code for this event internally. If <CallbackCode> is present, then the code is calculated on the spot. The problem is, with custom events, there is seemingly no way to execute any code because <CallbackCode> block appears not to be recognized if <EventID> is present.

Misho

No, you can have one or the other. However, that said, refactoring any <EventID> to a <CallbackCode> form is a trivial task...

Also, keep in mind that one is not really limited in the number of "commands" that may be generated by a single key event when using a <CallbackCode> block.

For example, these are functionally equivalent:

<EventID>LANDING_LIGHTS_TOGGLE</EventID>

<CallbackCode>(>K:LANDING_LIGHTS_TOGGLE)</CallbackCode>
 
Hello!
It's very interesting! I tried, few months ago, to control my Carrier landing light system (the FLOLS's meatball) through a custom animation based on a L:Variable and a gauge code which calculates the glide slope error.
Unfortunately, it seems that my carrier (sim boat container) doesn't read the L:Variable when the user's plane is more than 100-150m away from the ship...
So if any walk-around can be found out, it would be great!!
Many thanks for such interesting threads. :)

Regards,
Sylvain
 
Back
Top