rkusa/DATIS

No ATIS Station Found if static objects placed via script

jmlaforest opened this issue · 3 comments

I've been working on a dynamic script to place down Comms Towers using a lua script at Mission Start with example as follows:

local staticObj = {

	["name"] = "ATIS Batumi 124.425, TRAFFIC 131.000, VOICE WIN:Zira",
					["category"] = "Fortifications",
						["y"] = 618177.11352506,
						["angle"] = 37.55948550292,
						["x"] = -357027.10471629, 
					["type"] = "Comms tower M",
}
coalition.addStaticObject(country.id.USA, staticObj)

I've also tried placing using mist.dynAddStatic with smiliar table fields.

DATIS does not recognize these as ATIS points. The statics do in fact get placed in the mission but DATIS is not recognizing them

also of note this request is to create a plugin that can work with DCS Liberation as well.

rkusa commented

Right now, DATIS only scans for units/static objects at mission start, which is why a dynamically spawned unit/object does not work right now. I think using late activation might work though.

I am planing to add support for dynamically added units and/or a Lua API to create stations eventually (not ETA tho).

Kind of what I thought. Was hoping for a way for it to scan again at least 30 seconds after mission is started or unpaused, just enough to cover those statics being placed by a lua at mission start. And to clarify when I say I'm scripting these units to spawn there are absolutely zero units placed via the mission editor. It's blank and the lua script with above is what is placing those units once the miz file starts. Thank you.

Just thinking out loud, what about a command that can be done via lua to "restart" DATIS within this mission editor?