I know, the 'last loon' problem is ethernal, but I made a not too good, not too bad solution. This is the kamikaze script.
But I'm not sure in the first part of this script (getting parameters). I tested it in sample mission and I tested it real missions and it works. Only one mission I get an error message: divided by zero for the first parameter getting line.
;two last enemy attack (no hideing, no fleeing)
;use in trigger (enemy presence) activation field: thislist exec "kamikaze.sqs"
;condition field: count thislist < 3
_last1 = thislist select 0
_last2 = thislist select 1
_last1 allowFleeing 0
_last1 setUnitPos "up"
_last1 doMove getPos player
_last2 allowFleeing 0
_last2 setUnitPos "up"
_last2 doMove getPos player
#loop
~6
_last1 doMove getPos player
_last2 doMove getPos player
?((alive _last1) or (alive _last2)) : goto "loop"
exit
I'm not sure but I think this is the problem:
_last1 = thislist select 0
_last2 = thislist select 1
Is it OK, if I'll change it to this?
_last1 = _this select 0
_last2 = _this select 1