LOL OMG, Sui you just made the best artillery script ever!:D
Ok so anyways now the explosions fall on the ground, like artillery but they need to be in the air around the airplane.
And I really mean that about that artillery
but maby i changed it wrong.
here is the script.
;
;Created by Pica
;
;area of flak around target
;random height of flak
;target aircraft
;game logic name
;ammo to use
;example
;[150,10,blackhawk,log1,"shell73"] exec "flak.sqs"
_area = _this select 0
_height = _this select 1
_target = _this select 2
_logic = _this select 3
_ord = _this select 4
#loop
_where = getpos _target
_logic setpos [(_where select 0) - random _area + random _area, (_where select 1) - random _area + random _area, (_where select 2) + random _height +10]
? (_target distance _logic < 20): goto "loop"
_bomb = _ord camcreate getpos _logic
~random 2.5
;you can change the condition below the end
? alive _target : goto "loop"