


_K = _this select 0
_Target = _this select 1
_radius = _this select 2
_altitude = _this select 3

#Flakloop

_a= getpos _Target select 0
_b= getpos _Target select 1
_c= getpos _Target select 2

_gap=random _radius
_direction=random 360

_x = _a +((cos _direction)*_gap)
_y = _b +((sin _direction)*_gap)
_z = _c + _altitude - _radius + random (_radius*2)

_gap2=random _radius
_direction2=random 360

_xx = _a +((cos _direction2)*_gap2)
_yy = _b +((sin _direction2)*_gap2)
_zz =_c + _altitude - _radius + random (_radius*2)

_gap3=random _radius
_direction3=random 360

_xxx = _a +((cos _direction3)*_gap3)
_yyy = _b +((sin _direction3)*_gap3)
_zzz = _c + _altitude - _radius + random (_radius*2)

_gap4=random _radius
_direction4=random 360

_xxxx = _a +((cos _direction4)*_gap4)
_yyyy = _b +((sin _direction4)*_gap4)
_zzzz = _c + _altitude - _radius + random (_radius*2)

_K disableAI "Target"
_K disableAI "AutoTarget"
_K doWatch [_x,_y,_z]
~0.5
_K setVehicleAmmo 1
_K fire "2A14"
_K doWatch [_xx,_yy,_zz]
~0.5
_K fire "2A14"
_K doWatch [_xxx,_yyy,_zzz]
~0.5
_K fire "2A14"
_K doWatch [_xxxx,_yyyy,_zzzz]
~10 + random 20
goto "Flakloop"

exit