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