hackshasem.blogg.se

Dcs world multiplayer
Dcs world multiplayer




dcs world multiplayer

To reduce network traffic you may need to get data not after every frame but at some model time moments. Yaw = %.2f\n", t, name, altRad, altBar, pitch, bank, yaw))) %.2f\n", t, name, altBar, altRad, pitch, bank, yaw)) Local pitch, bank, yaw = LoGetADIPitchBankYaw() Local altRad = LoGetAltitudeAboveGroundLevel() Local altBar = LoGetAltitudeAboveSeaLevel()

DCS WORLD MULTIPLAYER CODE

So you need to code here your actions to get frame simulations results. The analogous command has code and value:ĭCS calls the function LuaExportAfterNextFrame every time the simulation frame finishes. There are discrete and analogous input control commands. LoSetCommand(3, 0.25) - rudder 0.25 right So if you want to set some input control commands then you can do it here. y(c:send("quit")) - to close the listener socketĭCS calls the function LuaExportBeforeNextFrame just before every simulation frame. Local file = io.open("./Temp/Export.log", "w")Ĭ = y(nnect(host, port)) - connect to the listener socketĬ:setoption("tcp-nodelay",true) - set immediate transmission modeĭCS calls the LuaExportStop function just after mission quit to make user finishing actions. It calls the LuaExportStart function just before mission start to make user script initializations. If you want to disable exporting features then remove additional third dash to make the comment multi-line again.ĭCS also prints to the Error.log file all other Lua error messages for the a script.ĭCS calls script functions for every mission simulation. So the closing multi-line comment bracket without opening one becomes the single-line comment too. For that add the single "-" just before "-[[" opening multi-line comment to convert it to the single-line comment "-[[". You need to uncomment the function LuaExportStart to activate it and to activate all other functions. c:setoption("tcp-nodelay",true) - set immediate transmission modeĭCS activates the Config\Export\a script at every mission start. c = y(nnect(host, port)) - connect to the listener socket local file = io.open("./Temp/Export.log", "w") Make initializations of your files or connections here.

dcs world multiplayer

Uncomment this function to enable data export! If you need to comment several lines then use "- " and "-" brackets: The Lua language use two sequential dashes "-" to start the single-line comment to the end of line. You can use them as stand alone examples for Lua script networking.Īt the top of a, there's some comments about it's use Look into the Scripts\LuaSocket folder and find a and a files. You can use LuaSocket to establish standard network connection between the a script and your local or remote program. DCS supplies LuaSocket 2.0 Beta files in the Scripts\LuaSocket folder and in the DCS installation folder.






Dcs world multiplayer