Advertisement
Guest User

Untitled

a guest
Jul 18th, 2018
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.17 KB | None | 0 0
  1. If (isServer) then {
  2.     private _middle = worldSize/2;
  3.     private _int = 0;
  4.     {
  5.         If ((toUpper (str _x) find “GARBAGEPALLET”) >= 0) then {
  6.             _x hideObjectGlobal true;
  7.             _int = _i + 1;
  8.         };
  9.     } forEach (nearestTerrainObjects [ [_middle, _middle], [], worldSize, false]);
  10.     diag_log format ["### CLUTTER REMOVER %1 Terrain Objects Hidden", _int];
  11. };
  12.  
  13. /*
  14.     If you wanted to filter for more classes.
  15.     Eg. Washing machines and stuff you’d do it like this
  16.  
  17.     if (
  18.         ((toUpper (str _x) find “GARBAGEPALLET”) >= 0)  ||
  19.         ((toUpper (str _x) find “GARBAGEWASHING”) >= 0)  ||
  20.         ((toUpper (str _x) find “GARBAGEBAGS”) >= 0)
  21.     ) then {
  22.         _x hideObjectGlobal true;
  23.         _int = _i + 1;
  24.     };
  25.    
  26.     // the above is an example, and silly. Because you could just shorten to GARBAGE and it will delete all of the items called garbage. But it may delete things called garbage you don’t wanna remove.
  27.    
  28.     nearestTerrainObjects returns the .p3d model name
  29.     https://configs.arma3.ru/158.135742-cup/configFile/CfgVehicles.html
  30.     If you check each of the land_ classes in that link, you can get the model names. eg
  31.     model = "\A3\Structures_F\Ind\Cargo\Cargo20_color_V1_ruins_F.p3d";
  32.  
  33. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement