Well as I am not on OFP right now i don't really know if it will work but i will go through it step by step....
(I will use quote boxes for triggers and other OFP things)
It can be done with a script but also with triggers and waypoints...
anyway... here it is in steps, off the top of my head
name each friendly group you can make any group name and condition name you like, i will use easy generic ones...
Put this line in the leaders Init line
GroupW1 = group this
Give each squad 2 waypoints, a S&D and cycle
Put two empty markers down where you want your second Waypoint to be, Name them marker1, marker2
create 3 triggers for your enemy squads
group each trigger to each corresponding enemy group.
TRIGGER (x3) SIZE: covers mission area
Any group member: not present
in the 'on activation' line write : sqd1dead = true
for each trigger remember to change the condition you created e.g. sqd1dead, sqd2dead, sqd3dead
Now make forth trigger
SIZE: 0,0
Put this in the condition line: sqd1dead && sqd2dead && sqd3dead
On Activation:[GroupW1, 0] setWPPos getMarkerPos "Marker1"; [GroupW1, 1] setWPPos getMarkerPos "Marker1"; [GroupW2, 0] setWPPos getMarkerPos "Marker2"; [GroupW2, 1] setWPPos getMarkerPos "Marker2"
what this will do is when all the conditions are met i.e. all the enemy squads are dead the fourth trigger will be activated and the waypoints of each group will be moved to the corresponding marker...
this is not a fool proof way of doing it... I would suggest a script, If you are still struggling PM me I will give you my eamil and you can send me your editor mission so I can try and help... maybe write a script for you... but try and get it to work for your self.
IF THIS DOESN'T WORK
[GroupW1, 0] setWPPos getMarkerPos "Marker1"; [GroupW1, 1] setWPPos getMarkerPos "Marker1";
CHANGE IT TO
[GroupW1, 1] setWPPos getMarkerPos "Marker1"; [GroupW1, 2] setWPPos getMarkerPos "Marker1";
As i say i don't have OFP here right now so I can't test this to be sure
I hope this helps
Kendo