I am searching for a method to catch a pressed key in LUA. In the help file I found a method oapi.keydown(kstate,<Scanode_of_key>) but I get a error message, when I call it: oapi_keydown: argument1: invalid type (expected handle).
This is what I tried so far:
kstate = {}
for i=1,256 do...
Hi JDat. I found a solution for serial input. Library "luars232" is needed. It's part of the luaforwindows tools. Search and install this great toolbox it has tons of usefull LUA extensions. Copy the luars232.DLL to your Orbiter main folder.
Modified script example:
rs232 = require("luars232")...
I can't get a solution for "Serial in". Opening the COM in read mode freezes Orbiter because LUA is waiting for incoming bytes. Maybe somebody has a better solution? I suggest using projects like MJoy16 in combination with SV Mapper to control the ship. It's easy to make a MJoy16 if you are...
What is the lack of Orbiter compared to flight simulators? We miss a possibility to display values, light led's and so on.
With LUA we can do this! We can now talk to a serial device and this is how to do it (works under XP and Windows 7).
What do we need.
1. Orbiter (of course :))
2. A free...
If you are using a Orbiter beta version, you can use a lua script to communicate via serial interface. I did that with my retro style 7 segment led display (PIC based). Dr. Schweiger implemented nearly all API functions in lua, so you don't need to write (and debug) a DLL.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.