// Bomb_area.sqf
//
// nil = [vehicle player, 2, 30, 60, 5, 15]execVM "Bomb_area.sqf"
_object = _this select 0;
_maxdelay = _this select 1;
_min_radius = _this select 2;
_max_radius = _this select 3;
_min_explosions = _this select 4;
_max_explosions = _this select 5;
_nexplosions = _min_explosions + random (_max_explosions - _min_explosions);
for [{_i=0},{_i < _nexplosions},{_i = _i + 1}] do
{
_rad = _min_radius + random (_max_radius - _min_radius);
_ang = random 360;
_bomb = "Bomb" createVehicle [(getPos _object select 0)+sin(_ang)*_rad, (getPos _object select 1)+cos(_ang)*_rad, 0];
_bomb setDamage 1;
Sleep (0.5 + random _maxdelay);
};