Advertisement
CoverB

Arma 3 Map Object Duplicate Checker (Uncommented)

May 17th, 2022
879
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. _handle = player call {
  2.     private _objList = [];
  3.     private _tempList = [];
  4.     private _resultsList = [];
  5.     private _nearList = [];
  6.     private _primeHouse;
  7.     private _dst = 1;
  8.     private _markerCount = 0;
  9.     private _type = "All";
  10.     _objList = [0,0,0] nearObjects [_type, worldsize*2];
  11.     _objList = _objList select
  12.     {   _objType = toLower typeOf _x;      
  13.     ///////   BLACKLIST  ///////// 
  14.         !("land_hutch_01_f" in _objType) && // beehive
  15.         !("light" in _objType) && // all lights
  16.         !("wall" in _objType) &&
  17.         !("fence" in _objType) &&
  18.         !("fuel" in _objType) && // gas pumps
  19.         !("fs_feed" in _objType) && // gas pumps again
  20.         !("stairs" in _objType) &&
  21.         !("ramp" in _objType) &&
  22.         !("powerline" in _objType) && // WICHTIG
  23.         !("grave" in _objType) &&
  24.         !("kontejner" in _objType) && // dumpster
  25.         !("corner" in _objType) &&
  26.         !("balik" in _objType) && // hay bale
  27.         !("shed_04" in _objType) &&
  28.         !("airshaft" in _objType) &&
  29.         !("toilet" in _objType) &&
  30.         !("misc_cargo" in _objType) && // cargo containers
  31.         !("targetp" in _objType) && // practice targets
  32.         !("chickencoop" in _objType) &&
  33.         !("fx" in _objType) // effects
  34.     ///////   BLACKLIST  /////////
  35.     };
  36.  
  37.     {   _primeHouse = _x;
  38.         _primePos = position _primeHouse;
  39.         _primeType = typeOf _primeHouse;
  40.         if (_primeType isKindOf "House") then {_dst = 3} else {_dst = 1};
  41.         _nearList = _primePos nearObjects [_primeType, _dst] select {!(_x isEqualTo _primeHouse) && (_x isKindof _PrimeType)};
  42.         _nearListCount = count _nearList;  
  43.         _markers = allMapMarkers select {((getMarkerPos _x vectorDistance _primePos) < 1)};
  44.        
  45.         if  ((_nearListCount > 0) && (count _markers == 0)) then
  46.         {   _markerCount = _markerCount + 1;
  47.             _marker = createMarker [str _markerCount, position _x];
  48.             _marker setMarkerType "hd_warning";
  49.             _marker setMarkerColor "ColorRed";
  50.             _marker setMarkerText (str _markerCount + " " + str (typeOf _x));
  51.             _tempList = [];
  52.             _tempList append [_markerCount];
  53.             {_tempList append [typeOf _x, getPos _x]} forEach _nearList;       
  54.             _resultsList append [_tempList];
  55.         };
  56.     } forEach _objList;
  57.  
  58.     {diag_log _x} forEach _resultsList;
  59. };
Advertisement
RAW Paste Data Copied
Advertisement