Jump to content

Recommended Posts

Posted

Hi.

 

I'm trying to make software for DCS world.

So, I need to get data (velocity,Angular speed,roll,yaw,etc..).

But It's not easy for me..:cry:

 

I know about existence of 'export.lua' but i don't know how to use it..

If you know solution please tell me..!

(I used UDP, IP telemetry for other games.)

 

and sorry for poor english :(

Posted

Export.lua may contain 5 standardized functions which are used as call backs out of DCS. DCS looks for the existence of export.lua and evaluates the content. If it finds functions with standardized names, they will be called periodically. Out of this functions you can execute your own code.

The attachment contains an export.lua, which was published with earlier versions of DCS. It contains a set of functions, which can be called out of the standard callbacks. The most important would be LoGetSelfData(). It returns a pointer to a table, containing all data of the simulated aircraft.

But use caution, not all of the functions can be called. A lot of it do not return valid data but simply crash the game. The export.lua was created as example for Flaming Cliffs and was never updated by ED.

The standardized functions are:

 

LuaExportStart()

Called, when the simulation starts. You can do all your initializations out of this function.

 

LuaExportBeforeNextFrame()

Just before DCS creates a new frame this function is called.

 

LuaExportAfterNextFrame()

When a frame is finished, this function is called.

 

LuaExportStop()

This function is called when the simulator stops.

 

LuaExportActivityNextEvent(t)

This function can be used to execute your code asynchronously after a defined time in a loop.

 

A better explanation can be found in the attached export.lua

Export.lua

[sIGPIC][/sIGPIC]

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...