DATIS icon indicating copy to clipboard operation
DATIS copied to clipboard

No ATIS Station Found if static objects placed via script

Open jmlaforest opened this issue 3 years ago • 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

jmlaforest avatar Jun 08 '21 23:06 jmlaforest

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

jmlaforest avatar Jun 09 '21 02:06 jmlaforest

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).

rkusa avatar Jun 09 '21 08:06 rkusa

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?

jmlaforest avatar Jun 09 '21 12:06 jmlaforest