Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _nearSmokesClose = [];
- _TargetSmokeClose = [];
- _nearSmokesFar = [];
- _TargetSmokeFar = [];
- _nearSmokesObjects = getPos player nearObjects ["SmokeShell",12];
- {
- if ((count _nearSmokesObjects) > 0) then
- {
- if ((player distance _x) < 5) then
- {
- _nearSmokesClose pushBack [(player distance _x),_x];
- }
- else
- {
- _nearSmokesFar pushBack [(player distance _x),_x];
- };
- };
- }forEach _nearSmokesObjects;
- if !(_nearSmokesClose isEqualTo []) then
- {
- {
- _nearSmokesClose sort true;
- _nearSmokesCloseO = ((_nearSmokesClose select 0) select 1);
- _TargetSmokeClose pushBack [(player distance _nearSmokesCloseO),_nearSmokesCloseO];
- }forEach _nearSmokesClose;
- };
- if !(_nearSmokesFar isEqualTo []) then
- {
- {
- _nearSmokesFar sort true;
- _nearSmokesFarO = ((_nearSmokesFar select 0) select 1);
- _TargetSmokeFar pushBack [(player distance _nearSmokesFarO),_nearSmokesFarO];
- }forEach _nearSmokesFar;
- };
- // debug 1-0 _nearSmokesClose
- systemChat format["nearSmokesClose debug 0-0: %1",_nearSmokesClose];
- // Debug 1-1 ZombieTargetSmokeClose
- systemChat format["TargetSmokeClose Debug 0-1: %1",_TargetSmokeClose];
Advertisement
Add Comment
Please, Sign In to add comment