DCS func getTechObjectPos

From DCS World Wiki - Hoggitworld.com

Scripting Root

Envrioment: Mission Scripting
Function: getTechObjectPos Added with: 2.7.0
Member Of: Airbase
Syntax: table Airbase.getTechObjectPos(Class Self , number/string ObjectType )
Description: Returns a table of vec3 objects corresponding to the passed value. Seems to only ever return a single object "Tower" object. Have been unable to get it to work with other types.


Return Value: table
Return Example: { ["pos"] = { ["y"] = 30.01003074646, ["x"] = 11039.798828125, ["z"] = 367775.40625, }, }
Examples: Adds the vec3 position of every tower belonging to a blue airbase to a list.
  local ab = coalition.getAirbases(2)
  local everyBlueTowerLocation = {}
  for i = 1 , #ab do
      table.insert(everyBlueTowerLocation, Airbase.getTechObjectPos(ab[i], "towers"))
  end
Related Functions: Airbase Functions: getCallsign, getUnit, getID, getCategoryEx, getParking, getRunways, getTechObjectPos, getRadioSilentMode, setRadioSilentMode, autoCapture, autoCaptureIsOn, setCoalition, getWarehouse,
Notes: