![fsx level d 767-300er delta airlines livery fsx level d 767-300er delta airlines livery](https://3.bp.blogspot.com/-2M3qbAzNSBQ/VvbXy6PiYlI/AAAAAAAAJZU/X7ws4lST-sIVBKsaldNmkdgZJIbpvt-UA/s1600/fsx%2B2016-03-25%2B17-41-27-766.png)
You'd have the plug-in loaded either by the mechanism in the INI file, or by naming it a (which s run automatically on FS initialisation, when ready to fly). There would be no assignment in FSUIPC whatsoever. The whole point of using event.key is for the plug-in to detect the keys presses and execute the action.
FSX LEVEL D 767 300ER DELTA AIRLINES LIVERY CODE
How are you running the Lua plug-in? If you think it is working, then I assume you assigned a keypress to it? You might as well assign the keypress directly to the macro!Įvent.key(186, 8, "AltitudeIncrease") - I use the key for this, since "A" is already assignedīecause the function this calls does nothing (having no code in it), this line does nothing except waste time and space. This will execute once when the Lua is loaded. The whole point of a function is to do something, else you waste time and space. So when it is called by the event, it does. This does nothing at all, because there is no code between the function statement and the 'end'. Let's see:įunction AltitudeIncrease(keycode, shifts) end Well, it looks completely wrong, I'm afraid.
FSX LEVEL D 767 300ER DELTA AIRLINES LIVERY TRIAL
It was a process of trial and error, but eventually I made some code that seems to work: I know there is an easier way to do this, through FSUIPC directly, but I thought that would teach me the basics of Lua programming. "A") trigger one of my mouse macros (e.g. I decided to start with something simple: have a simple keypress (e.g.
![fsx level d 767-300er delta airlines livery fsx level d 767-300er delta airlines livery](https://www.simflight.it/wp-content/uploads/2018/05/Senza-titolo-2-1-768x329.jpg)
If these were button inputs it could be done easily with button flags, but FSUIPC provides no such programming facilities in the INI for button presses. If it is always going to be A B one way and B A the other, then, yes, you could use flags. I would think that with only two keys, A and B, won't both directions be indistinguishable or does the input always stop on a B going one way and A going the other? If, like most rotaries, you can't control the stopping position, the sequence wither way could be A B A B A or B A B A B. That's why I've come to ask for help: can anyone explain how I could make this work? Any reference to the manual, to something I might have missed (or misunderstood) is also appreciated. However, I hadn't thought of the same problem as before until trying it: when programming FSUIPC for both clockwise and counterclockwise, there is also this compensation and nothing happens on the MCP. At each detent, the flag is again set by "A" and then "B" triggers "ALT-". If "A" sets a flag, "B" could then trigger "ALT-" if the flag is set. When turning counterclockwise, the encoder would always send "A" and then "B" at each detent. I then thought that I might work with flags.
![fsx level d 767-300er delta airlines livery fsx level d 767-300er delta airlines livery](https://i.ytimg.com/vi/3F1ofnw0j1o/mqdefault.jpg)
If I assign the "A" key to "ALT+" and the "B" key to "ALT-", nothing happens, because the first always compensates for the latter, and the other way around. I have made a mouse macro, with "ALT+" to increase the altitude and "ALT-" to decrease it. Let's say my encoder is wired to both the "A" and the "B" key and that I want to control my altitude on my MCP with the encoder. My encoders have three terminals, so with each detent, two keys are "pressed". I'm trying to make an encoder work while wiring it to an old keyboard I hacked. I've been researching quite a lot and I've read the documentation provided with FSUIPC a couple of times. I use FSX, a registered version of FSUIPC 4.703 and the LevelD 767.