Hello, I have a question about getting game variables like RPM and wheel speed in a C# script or sending it out via a serial port. I would like to make a dashboard with from an Arduino, but the only thing I don't know is how to get variables like RPM out the game into a C#, C++, java script or something like that. I hope someone can help me.
Hi, the game ships with the luasocket library which you can use for interprocess communication. In both game engine and vehicle Lua you can import the socket library and open a connection. Another application listening on the other end can then send & receive data. To import the socket library: Code: local socket = require('libs/luasocket/socket.socket') From then on, the library mostly behaves like sockets from C. One caveat is that any blocking call in Lua also leads to the game halting, so read-calls to sockets with no data available would make the game hang until data is read. To avoid this, use the socket.select function described here or rely on the Copas library, which is also available in our Lua.