OK, I have only just started scripting again after several years out of the game... So rusty as hell, and I probaly need you to hold my hand through some of the explanations.
Basically a quick synopsis of what I want to happen:
West side, Resistance, and East are all fighting each other (You are lone east soldier) at the end of a battle between the 3 sides if West and Resistance are all dead, and you are close to any surviving East soldiers - you join and lead them.
So far I have developed the following script, which isn't quite working:
;alldead.sqs script PROBLEMS WITH CHECKING IF GROUPS ARE ALIVE!!!! MSUT FIX
#start
;check to see if there's any east guys left alive, otherwise exit the script
? (alive eastgr1 or alive E1_2 or alive E1_3 or alive E1_4 or alive E1_5 or alive E1_6 or alive E1_7 or alive E1_8 or alive E1_9) : goto "Check"
exit
#check
;check the area triggers to see whether any west or res soldiers still alive in area
? (westdead == 1) and (resistancedead == 1) : hint "All enemies here are dead", goto "alldead"
? (westdead == 0) and (resistancedead == 1) or (westdead == 1) and (resistancedead == 0) : goto "Start"
#alldead
;find the position of the player, and his comrades, and if he is close enough he will join them
getpos player = PlayerPos
"getpos" ForEach (units group eastgr1) = EastGr1Pos
? (player distance "EastGr1Pos" < 30) : Player join eastgr1
exit
Much obliged to anyone who could help me out, If I wasn't so in love with myself I'd start tearing my beutiful sexy hair out.