My understanding is that soldiers don't shoot at vehicles unless the damage they'd inflict would be sufficient to penetrate the armour. Values for this are in the main config for the game. Some Mods change these values, so you might see machinegunners shooting at helicopters in ECP and FFUR, etc.
They still wouldn't use M16s though, so I suggest using
Fox's Invisible targets.
Place an Invisible, Medium Priority, Infantry target by each chopper, and name them appropriately:
heli1, helitarget1. Then use a general script that will position the target over the chopper:
_heli = _this select 0
_target = _this select 1
#setpos
if (alive _heli) then {_target setPos GetPos _heli} else {deleteVehicle _target; exit}
~0.05
goto "setpos"
The script just needs to be called when necessary, in the following manner
[heli1, helitarget1] exec "MoveTarget.sqs"
If the helicopter is destroyed, the Invisible Target should be deleted and the script exit; so
setDammage 1 the choppers when they're no longer needed.
Units tend not to engage beyond 250 metres in unmodified OFP, so you may need some tweaks to get it to play as you want, for instance:
- change the Priority of the target, so that actual enemy soldiers are shot at in preference
- use
reveal to alert different groups of soldiers to each Invisible Target, maybe in conjunction with
doTarget or
commandTarget (for the group leader)