// temporary function - likely to be replaced in proper mod development context params ["_hq", "_player"]; // Grab all Depots at the HQ private _baseDetails = _hq getVariable "baseDetails"; private _depots = _baseDetails get "depots"; if (_depots isEqualTo []) exitWith { [ "CLF_ShowMessage", [ 1, 0, "No connected supply depots found." ], _player ] call CBA_fnc_targetEvent; // Return false; false; }; // Check current materiel available at this base private _currentMateriel = 0; { _currentMateriel = _currentMateriel + (_x getVariable ["currentMateriel", 0]); } forEach _depots; // Return result _currentMateriel;