Jakah

Untitled

Oct 23rd, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.20 KB | None | 0 0
  1. _nearSmokesClose = [];
  2. _TargetSmokeClose = [];
  3. _nearSmokesFar = [];
  4. _TargetSmokeFar = [];
  5.  
  6. _nearSmokesObjects = getPos player nearObjects ["SmokeShell",12];
  7. {  
  8.     if ((count _nearSmokesObjects) > 0) then  
  9.     {  
  10.         if ((player distance _x) < 5) then  
  11.         {  
  12.             _nearSmokesClose pushBack [(player distance _x),_x];
  13.         }
  14.         else  
  15.         {
  16.             _nearSmokesFar pushBack [(player distance _x),_x];
  17.         };
  18.     };  
  19. }forEach _nearSmokesObjects;
  20.  
  21.  
  22.             if !(_nearSmokesClose isEqualTo []) then
  23.             {  
  24.                 {
  25.                     _nearSmokesClose sort true;
  26.                     _nearSmokesCloseO = ((_nearSmokesClose select 0) select 1);
  27.                     _TargetSmokeClose pushBack [(player distance _nearSmokesCloseO),_nearSmokesCloseO];
  28.                 }forEach _nearSmokesClose;
  29.             };
  30.  
  31.             if !(_nearSmokesFar isEqualTo []) then
  32.             {  
  33.                 {
  34.                     _nearSmokesFar sort true;
  35.                     _nearSmokesFarO = ((_nearSmokesFar select 0) select 1);
  36.                     _TargetSmokeFar pushBack [(player distance _nearSmokesFarO),_nearSmokesFarO];
  37.                 }forEach _nearSmokesFar;
  38.             };
  39.  
  40. // debug 1-0 _nearSmokesClose
  41. systemChat format["nearSmokesClose debug 0-0: %1",_nearSmokesClose];
  42. // Debug 1-1 ZombieTargetSmokeClose
  43. systemChat format["TargetSmokeClose Debug 0-1: %1",_TargetSmokeClose];
Advertisement
Add Comment
Please, Sign In to add comment