Jump to content
Sign in to follow this  
1para{god-father}

Military Camps

Recommended Posts

Is there any way to get a array of all military Camps/ Compounds ?

I know I can get all villages etc..

nearestLocations [getPosATL player, ["NameCityCapital","NameCity","NameVillage"], 25000];

But could not find Just Military

Cheers

Share this post


Link to post
Share on other sites

Maybe you can get some ideas from this:

if (isServer or isDedicated) then {

_placesCfg = configFile >> "CfgWorlds" >> worldName >> "Names";
_namesToKeep = ["MILITARY","FACTORY","POWER PLANT","QUARRY",""];
_typesToChk =["NameLocal","Hill"];
_places = [];
for "_i" from 0 to (count _placesCfg)-1 do
{
	_place = _placesCfg select _i;
	_name = toUpper(getText(_place >> "name"));
	_position = getArray (_place >> "position");
	_type = getText(_place >> "type");
	if((_type in _typesToChk) && (_name in _namesToKeep))then {
		if (_name == "") then {_name = "Hill"};
		_opname = format["%1 %2", _name, _i];
		_mrkr = createMarker [_opname, _position];
		_mrkr setMarkerShape "ICON";
		_mrkr setMarkerColor "ColorBlack";
		_mrkr setMarkerSize [1, 1];
		_mrkr setMarkerType "mil_flag";
		_mrkr setMarkerText _opname;
	};
};
}; 

MILITARY, FACTORY, POWER PLANT, and QUARRY are paired with NameLocal while HILL is paired with ""

Edited by tomturner

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×