arma2-epoch-server/@DayZ_Epoch_Server/addons/dayz_server/WAI/compile/minefield.sqf
2022-04-21 16:15:41 +03:00

16 lines
432 B
Plaintext
Executable File

private["_area_max","_area_min","_position","_num_mines","_mines"];
_position = _this select 0;
_area_min = _this select 1;
_area_max = _this select 2;
_num_mines = _this select 3;
_mines = [];
for "_x" from 1 to _num_mines do {
_mine_pos = [_position,_area_min,_area_max,10,0,2000,0] call BIS_fnc_findSafePos;
_mine = createVehicle ["Mine", _mine_pos, [], 0, "CAN_COLLIDE"];
_mines set [(count _mines), _mine];
};
_mines