Jump to navigation Jump to search
- Removes the specified waypoint.
- Example 1:
- deleteWaypoint [_grp, 2];
- Example 2:
- Because waypoints get immediately re-indexed when one gets deleted, delete them from last to first:
or always delete the first one (if you want to delete them all)or use forEachReversed:
- See also:
- waypoints setCurrentWaypoint setWaypointPosition setWaypointScript setWaypointStatements setWaypointType addWaypoint
- Posted on Jan 01, 2008 - 07:48 (UTC)
- In order to change the behavior of a unit currently following some waypoints, it is not enough to use deleteWaypoint. To achieve the wanted effect, you should rather use setWPPos to the unit's current position (thereby stopping the unit), and (after a small delay) use deleteWaypoint to remove the next waypoints.
- Posted on Nov 15, 2008 - 13:37 (UTC)
- Another (more foolproof) method to avoid the problem of non-deleteable waypoints is to introduce another group (createGroup) and join all units of the present group. A new group will start without any preset waypoints so you can start setting new WPs all over again. Old group is "_combatGroup", new group is "_combatGroup2"
- Posted on Nov 17, 2019 - 16:52 (UTC)
- To have the unit stop on the spot you need to set its current waypoint where it is and add a little delay, as stated above by Saintolaf so: