I know how to use cycling waypoints in the editor but I am creating waypoints in a script and it would seem the cycling command doesn't cause them to cycle in script form. The squads just go to the last waypoint and stop. I don't have any wait time assigned to it. They should just turn around and head back. THis is what I have in a simplified form:
#Randomize
_rand = random 3
_num = _rand - (_rand mod 1)
~1
?(_num==0):goto "Waypoint1"
?(_num==1):goto "Waypoint2"
?(_num==2):goto "Waypoint3"
#Waypoint1
_WP1 = _grp addWaypoint [wp1, 1]
[wp1, 1] setWaypointType "SAD"
[wp1, 1] setwaypointBehaviour "COMBAT"
[wp1, 1] setWaypointCombatMode "RED"
[wp1, 1] setWaypointSpeed "NORMAL"
goto "wpCity"
#Waypoint2
_WP2 = _grp addwaypoint [wp2, 1]
[wp2, 1] setWaypointType "SAD"
[wp2, 1] setwaypointBehaviour "COMBAT"
[wp2, 1] setWaypointCombatMode "RED"
[wp2, 1] setWaypointSpeed "NORMAL"
_WP2_1 = _grp addwaypoint [wp2_1, 2]
[wp2_1, 2] setWaypointType "SAD"
[wp2_1, 2] setwaypointBehaviour "COMBAT"
[wp2_1, 2] setWaypointCombatMode "RED"
[wp2_1, 2] setWaypointSpeed "NORMAL"
goto "wpCitySide"
#Waypoint3
_WP3 = _grp addwaypoint [wp3, 1]
[wp3, 1] setWaypointType "SAD"
[wp3, 1] setwaypointBehaviour "COMBAT"
[wp3, 1] setWaypointCombatMode "RED"
[wp3, 1] setWaypointSpeed "NORMAL"
_WP3_1 = _grp addwaypoint [wp3_1, 2]
[wp3_1, 2] setWaypointType "SAD"
[wp3_1, 2] setwaypointBehaviour "COMBAT"
[wp3_1, 2] setWaypointCombatMode "RED"
[wp3_1, 2] setWaypointSpeed "NORMAL"
goto "wpCitySide"
#wpCity
_WPCity = _grp addWaypoint [wpCity, 2]
[wpCity, 2] setWaypointType "SAD"
[wpCity, 2] setwaypointBehaviour "COMBAT"
[wpCity, 2] setWaypointCombatMode "RED"
[wpCity, 2] setWaypointSpeed "NORMAL"
_WPCityPat = _grp addWaypoint [wpCityPat, 3]
[wpCitypat, 3] setWaypointType "CYCLE"
[wpCitypat, 3] setwaypointBehaviour "COMBAT"
[wpCitypat, 3] setWaypointCombatMode "RED"
[wpCitypat, 3] setWaypointSpeed "NORMAL"
goto "exit"
#wpCitySide
_WPCity = _grp addWaypoint [wpCity, 3]
[wpCity, 3] setWaypointType "SAD"
[wpCity, 3] setwaypointBehaviour "COMBAT"
[wpCity, 3] setWaypointCombatMode "RED"
[wpCity, 3] setWaypointSpeed "NORMAL"
_WPCitypat = _grp addWaypoint [wpCityPat, 4]
[wpCitypat, 4] setWaypointType "CYCLE"
[wpCitypat, 4] setwaypointBehaviour "COMBAT"
[wpCitypat, 4] setWaypointCombatMode "RED"
[wpCitypat, 4] setWaypointSpeed "NORMAL"
goto "exit"
#exit
exit
My issue is the setwaypointtype "cycle". It is the last waypoint assigned to the _grp for each path they may follow. I could set up a loop of some sort to add like 30 waypoints and force it that way.. But that seems like a good way of bogging things down. Shouldn't Cycle work? And if Not is there another way? Waypoints in the Editor won't work... Unless you know of a way to assign them to created units that spawn at a certain interval. And then to be able to move the waypoints themselves to new cities...