Cheers mateyboots. Well you're right about one thing, I've amassed a helluva lot more knowledge about scripts than I had before, thanks to working on this one! Still not working right. Thanks for the corrections but despite working on this one damned waypoint for the last two days I still can't fix it. I've even tried replacing the UH60 with an AH1 in case that made a difference (it didn't) and changing the mission from dawn to mid-afternoon in case the extra light helped (it didn't). As a result of corrections/further exploration the script is currently:
_loons = _this select 0
#Update
~1
? (_loonsleft == 0) : goto "Done"
"BlackhawkG reveal _x" forEach _loons
if alive _loons then BlackhawkD dotarget _loons select 0
if alive _loons then BlackhawkG dotarget _loons select 0
if alive _loons then BlackhawkG dofire _loons select 0
if NOT (Alive _loons) then _loonsleft = _loonsleft - 1
goto "Update"
#Done
exit
And it is triggered by the following (in the On Activation window of the S&D waypoint):
[Crewski, Pilotski1, Pilotski2, Pilotski3, Gunnerski1, MGski, Gruntski, RPGski, AAski, Medicski, Grenadeski, Officerski, Soldierski, Soldierski2] exec "Blackhawktargets.sqs"
One thing I am curious about is the _loonsleft line. I couldn't find `left' in the scripting command reference guide (you know, the big alphabetical one) but am I right in assuming you can use it for any array? And does the script as it stands automatically deduct item 0 from the list using _loonsleft-1 when the target's been killed, so that the previous item 1 becomes the new item 0?
Anyway, for the time being, given the pilot's lack of enthusiasm for the business of war, I intend to short-circuit the whole business by having the UH60 join the players team upon arriving. That way the player can direct it to attack whomsoever he wants. I'll see if I can get them to at least do that.