It's possible, but requires some nasty use of Repeating Switch triggers, which can confuse the hell out of anyone, to return the units to their previous patrol after no longer having any contacts. Luckily, ArmA has included a new command,
setCurrentWaypoint which will alleviate a lot of your troubles!
Here's how I'd do it:
Say you have 4 move waypoints + 1 cycle waypoint. These would, I believe, be numbered 1,2,3,4 and 5 for the cycle. Now place down your S&D waypoint after the cycle, this one should be number 6. Lets assume the group is named "group1" (named by placing group1 = group this in the leader's init field, for instance)
Create a trigger, repeating, with something like "OPFOR detected by BLUFOR", as has been suggested. Now, instead of making it a Switch type and linking it with the Cycle WP to break it, we use the setCurrentWaypoint command instead, while also moving the actual waypoint (as you requested) using
setWaypointPosition:
On Activation : [group1, 6] setwaypointposition [position (thisList select 0), 0]; group1 setcurrentwaypoint [group 1, 6]; [group1, 6] setwaypointposition [getWpPos [group1, 6], 0]; hint "Enemy detected, attacking."
On DeActivation = group1 setcurrentwaypoint [group 1, 1]; hint "Group resuming patrol!"
Now, the group will skip all their waypoints, including their cycle waypoint, and go towards their S&D wp, which, incidentally, has just been moved. The second "setwaypointposition" is there to address a slight bug I've found sometimes when moving waypoints - they would not be properly updated unless they've been moved "again" - might not be an issue though. In a "OPFOR detected by BLUFOR" trigger, the "thisList" of the trigger will always be a list of detected OPFOR units, which explains the placement. Now - I have not done too much research into the On Deactivation field of triggers, but generally they come into effect when the condition that started the trigger is no longer true - in this case that there are no more OPFOR detected by BLUFOR. Upon which the current waypoint of the group will be reset to within the loop cycle (waypoint 1), which will cause them to continue to patrol within it...until the repeated "OPFOR detected" trigger starts up again, that is!
I haven't got ArmA access here, so I can't test this, and if it doesn't work with the On Deactivation, you can always try with several triggers, global variables, and other funstuff.
Good luck!
Wolfrug out.