; Bombarding
; Run from mission:
; [who, A, B, C, "Name"] exec "BigBaraBoom.sqs"

; who - who runs the script (can be anybody)
; A - how many bombs
; B - diameter of "Area bombed"
; C - timout between two bombs
; D - name of the marker, which is in the middle of the "Area bombed"


_pos = getmarkerpos (_this select 4);
_bomb = "Bomb" createVehicle _pos;

_i = 0;
_j = _this select 1;
_k = _this select 2;
_t = _this select 3;

~((random 5)+2)

#LOOP

_u = random _k;
_bomb setpos [(_pos select 0) - _k/2 + random _k, (_pos select 1) - _k/2 + random _k]
_bomb setdammage 1;

Bombing = true;

~((random (_t-5))+5)
_bomb setdammage 0;
~0.5

_i = _i+1;

? _i < _j : goto "LOOP"

deleteVehicle _bomb;
