DCS func getTechObjectPos

From DCS World Wiki - Hoggitworld.com
Revision as of 21:48, 14 April 2021 by Grimes (talk | contribs) (Created page with "{{Template:dcs_funcs |fName= getTechObjectPos |vNum= 2.7 |par1= Airbase |par2= |par3= |par4= |desc= Returns a table of vec3 objects correspondin...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Scripting Root

Envrioment: Mission Scripting
Function: getTechObjectPos Added with: 2.7
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, getDispatcherTowerPos, getRadioSilentMode, setRadioSilentMode, autoCapture, autoCaptureIsOn, setCoalition, getWarehouse,
Notes: