Jump to content

InitialiseAllAirBases

From CMM Wiki
Return to CMM Command Reference
Environment: Mission Scripting
Function: initialiseAllAirBases
Function Description: initialises Airbase persistence for a mission by loading all airbases that are not black‑listed and disabling auto‑capture.
File Location: cmm.AirBaseFunctions.lua
Syntax: CMM.initialiseAllAirBases( , table BlackList , table DefaultWarehouse string or nil AirbasePersistenceDirectory )
Return Value: nil
Parameters: Name Description
BlackListList of airbase names that should be ignored (e.g., temporary facilities or bugged terrain airbases).
DefaultWarehouseOptional default warehouse configuration; passed through to the persistence loader.
AirbasePersistenceDirectoryDirectory location of the Airbase Persistence files for this mission. If nil, defaults to CMM.MISSION.PDIR .. "AIRBASES\\".
Example: CMM.initialiseAllAirBases(CMM.MISSION.PDIR .. "AIRBASES\\", {"FOB123", "Kutasi"})
Example Description: Loads all airbases from the default persistence directory while skipping the two names in blacklist. Each processed airbase will have its persistence file loaded (if present) and auto‑capture disabled.
Related Functions:
Notes: