• 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:SE Restrict Use Of L Key When Using Effects

Messages
5
Country
us-michigan
I have recently been doing some work to tweak several aircraft that my friends and I fly together in multiplayer. A large part of this has been improving the effects like afterburners and vapor when pulling G. I can assemble basic XML gauges, and I have successfully coded some to control the afterburners and vapor effects through the logo/wing/recog light slots. They are forced on when conditions are met, and forced off when they are not met (with a check to prevent command flooding). Hitting the L key may make them flicker, but the gauge quickly takes over and restores them to working order.

However, this is not the case in multiplayer. Although the gauges seem to work normally, when another pilot hits L the other players will see all of the effects come on. For some reason it takes several cycles of hitting L to get them shut off again. There are many aircraft that do not have this issue, so it should be solvable.

My recent thought was to implement a key trap so that hitting L only turns on the first five light types (beacon, strobe, nav, landing, cockpit), and does nothing for the second five types (leaving these available as gauge-controlled effect slots). Using some previous posts here and the wiki, I successfully implemented this along with a VC gauge that auto-opens it, so it will work even in external view. This works fine most of the time, but it does not catch the L command 100% of the time. If I hit L 10 times in a row, it might get caught 5 times but the other 5 it will slip past the gauge entirely and flip everything on.

Is there a more robust way of ensuring these effects are triggered only by the gauges and not by a careless L key? Some of the group are not very technically savvy, so I'm trying to idiot proof it as much as possible. We could fly with it as is, but I really don't want to see burners and vapor on a parked aircraft...

From research I gather that C++ and/or Simconnect may represent better avenues to make this work, but I am completely inexperienced with those.

Is it possible to code a generic gauge which locks L to the first five light types? If I could get that, I could install it on many different aircraft and solve a lot of headaches.
 
Wouldn't it be better to use smoke effect triggers instead? Hijacking predefined functions is always dicey in my opinion.
 
C++ SimConnect is the way to go. Here is a post detailing just the masking procedure:

https://www.fsdeveloper.com/forum/threads/masking-events-using-string-name.9173/post-60572

Thanks, I will follow that rabbit hole. Unfortunately I just don't know that I have the skills to get there :/

Wouldn't it be better to use smoke effect triggers instead? Hijacking predefined functions is always dicey in my opinion.

I have done this with other things in the past, but one problem is that the effects show up differently when used as lights vs smoke. Vapor designed for lights is thinner, and when set as a smoke system it is MUCH thicker.

The other main problem is that we use the smoke for a flare effect, so it gets put on and off quickly. Setting vapor and burners to smokes means they come on/off for an instant between the button press and the gauge forcing them on or off. Triggering flares means a weird pulsating vapor trail :)
 
Wouldn't it be better to use smoke effect triggers instead? Hijacking predefined functions is always dicey in my opinion.

Depends on whether the dll doing it is aircraft specific or not. In the former case, it is perfectly safe. I masked the default lights key event from the sim and directed it into my custom lighting systems no problem.
 
But my addon aircraft might takeover the sim inputs to ensure accurate aircraft systems modelling... at which point there is a conflict. As example. While I don't see this as an issue for this specific situation... it is still important (in my opinion) to recognize that hijacking core sim behavior may not be in the best interest of all. We all have to play nice.
 
But my addon aircraft might takeover the sim inputs to ensure accurate aircraft systems modelling... at which point there is a conflict. As example. While I don't see this as an issue for this specific situation... it is still important (in my opinion) to recognize that hijacking core sim behavior may not be in the best interest of all. We all have to play nice.

That’s my point re aircraft specific. If you switch from my aircraft to yours, my masks are unloaded with my dll and simconnect client and are open again for you to use as you see fit.
 
Back
Top