New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keypress detection needed for Lua scripts #422
Comments
That (C++) code needs to be build against OpenOrbiter ABI to work for OpenOrbiter. That keystate Lua lib (C++ code to build |
As far as I can tell keystate.dll it was a collaboration between dgatsoulis and martin: https://www.orbiter-forum.com/threads/trying-to-implement-keypress-detection-in-lua-solved.41000/ |
Wouldn't it be cleaner to expose the "clbkConsume*Key" methods to the lua side? (if you're using a ScriptVessel) |
Probably, but right now there isn't anything for Lua in OpenOrbiter at all. Beggars can't be choosers; I'll take whatever we can get done. But yes, it would probably be best to continue trying to get more callbacks exposed so we can make some add-ons without version control becoming a nightmare. |
I'm willing to take a shot at upgrading the ScriptVessel to VESSEL4 and add some callbacks (the easy ones at first) if nobody is working on this already |
Right now Lua has only the following vessel callbacks:
The clbkConsume*Key callbacks would allow functional add-ons to be made without the need for a special module. I submitted Issue #421 for Lua equivalents to clbkSaveState and clbkLoadStateEx. These I think are pretty critical to making Lua usable for add-ons as they would permit vessel states to be read/written from/to scenario files, and so I'd suggest that they get some priority too. If we could get the clbkSaveState and clbkLoadStateEx vessel callbacks and just enough clbkConsume*Key callbacks sufficient to process basic key events for for animation events etc., it will become possible to make some basic vessel add-ons with similar behavior to C++ module add-ons. People probably will start squawking for callbacks to enable staging events and more complicated stuff, but I think the above would be the best place to start. |
I've started just that on PR #427 |
Hi, it seems you are experiencing the same "test-issues" as I did in #414 ... By the way: Did you read these instructions? |
Oh no it's just because I'm stupid, this file is not supposed to be used for CI but to do manual tests with a lua version of the HST that I'm making along to figure out what's needed most. |
There is no means using Lua to detect keypresses to provide inputs into vessel scripts.
There was a module developed that allowed keypress detection in Lua for Orbiter 2016:
https://www.orbiter-forum.com/threads/trying-to-implement-keypress-detection-in-lua-solved.41000/
but it does not appear to work for OpenOrbiter builds.
The text was updated successfully, but these errors were encountered: