You must script something with your condition.
call {
if (something true) exitWith {
myGroup addWaypoint [apositionHere, 0];
<all waypoint behavior here>;
};
if (something else true) exitWith {
myGroup addWaypoint [anotherpositionHere, 0];
<all waypoint behavior here>;
};
};
See
addWaypoint.