I briefly tested the following in the Mission Editor, using a Shilka named
flak:
To point it in an approximate direction I used
doWatch as that command can use a position, not just a target. This points it north-east at an elevation of 45 degrees.
flak doWatch [(getPos flak select 0) + 100, (getPos flak select 1) + 100, 100]
Then I used the alternative command
fire to make sure the weapon is used. Again because the unit does not have an actual target to shoot at.
flak Fire "ZsuCannon"
Edit: again using Shilkas, this script will enable a battery to fire at an area north of their position. It's launched by
{[_x] exec "TripleA.sqs"} forEach [flak,flak2,flak3,flak4]
and can be stopped by setting
CeaseFire to true.
_flak = _this select 0
_rounds = 0
CeaseFire = false
goto "Targetting"
#Burst
_rounds = _rounds - 1
_flak fire "ZsuCannon"
~0.1
? (_rounds > 0): goto "Burst"
#Targetting
_flak doWatch [(getPos _flak select 0) - 60 + random 120, (getPos _flak select 1) + 100, 100 + random 100]
~3 + random 2
?CeaseFire: exit
;#Firing
_rounds = 6 + random 14
_rounds = _rounds - (_rounds mod 1)
goto "Burst"