Jump to content

Procuring a table with AIRBASE names


Wizard1393

Recommended Posts

How would one procure a table with airbase names? Function world.getAirbases() only returns airbase ID's right?

GPU: PALIT NVIDIA RTX 3080 10GB | CPU: Intel Core i7-9700K 4,9GHz | RAM: 64GB DDR4 3000MHz
VR: HP Reverb G2 | HOTAS: TM Warthog Throttle and Stick
OS: Windows 10 22H2

Link to comment
Share on other sites

https://wiki.hoggitworld.com/view/DCS_func_getAirbases returns a table of airbase objects https://wiki.hoggitworld.com/view/DCS_Class_Airbase

So you can use getName(), i.e. something like

   -- get airbases of coalition
   local ab=coalition.getAirbases(coalition.side.BLUE)
   
   -- loop over airbases
   for _,airbase in pairs(ab) do
   
     local _id=airbase:getID()
     local _p=airbase:getPosition().p
     local _name=airbase:getName()

    -- your stuff
   end

A warrior's mission is to foster the success of others.

i9-12900K | MSI RTX 3080Ti Suprim X | 128 GB Ram 3200 MHz DDR-4 | MSI MPG Edge Z690 | Samung EVO 980 Pro SSD | Virpil Stick, Throttle and Collective | MFG Crosswind | HP Reverb G2

RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...