Difference between revisions of "DCS func getDispatcherTowerPos"

From DCS World Wiki - Hoggitworld.com
(Created page with "{{Template:dcs_funcs |fName= getDispatcherTowerPos |vNum= 2.9.6 |par1= Airbase |par2= |par3= |par4= |desc= Returns a table of vec3 objects corre...")
 
 
(2 intermediate revisions by the same user not shown)
Line 22: Line 22:
 
|reqName1= Self
 
|reqName1= Self
  
|reqType2= number/string
+
|reqType2=  
  
|reqName2= ObjectType
+
|reqName2=  
  
 
|reqType3=
 
|reqType3=
Line 41: Line 41:
 
   local everyBlueTowerLocation = {}
 
   local everyBlueTowerLocation = {}
 
   for i = 1 , #ab do
 
   for i = 1 , #ab do
       table.insert(everyBlueTowerLocation, Airbase.getDispatchTowerPos(ab[i], "towers"))
+
       table.insert(everyBlueTowerLocation, Airbase.getDispatcherTowerPos(ab[i]))
 
   end
 
   end
  
|notes= From DCS 2.7.0 to 2.9.6 this function was Airbase.getTechObjectPos. That function was effectively removed and renamed to getDispatchTowerPos
+
|notes= From DCS 2.7.0 to 2.9.6 this function was Airbase.getTechObjectPos. That function was effectively removed and renamed to getDispatchTowerPos. The required "towers" parameter was also removed.
 
}}
 
}}
 
[[Category:Class Functions|getDispatcherTowerPos]]
 
[[Category:Class Functions|getDispatcherTowerPos]]
[[Category:Game Patch 2.7.0|getDispatcherTowerPos]]
+
[[Category:Game Patch: 2.9.6|getDispatcherTowerPos]]

Latest revision as of 01:06, 13 July 2024

Scripting Root

Envrioment: Mission Scripting
Function: getDispatcherTowerPos Added with: 2.9.6
Member Of: Airbase
Syntax: table Airbase.getDispatcherTowerPos(Class Self )
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.getDispatcherTowerPos(ab[i]))
  end
Related Functions: Airbase Functions: getCallsign, getUnit, getID, getCategoryEx, getParking, getRunways, getTechObjectPos, getDispatcherTowerPos, getRadioSilentMode, setRadioSilentMode, autoCapture, autoCaptureIsOn, setCoalition, getWarehouse,
Notes: From DCS 2.7.0 to 2.9.6 this function was Airbase.getTechObjectPos. That function was effectively removed and renamed to getDispatchTowerPos. The required "towers" parameter was also removed.