Page tree
Skip to end of metadata
Go to start of metadata


Introduced in

Version:1.00

Description

Description:Removes the given waypoint.

Syntax

Syntax:deleteWaypoint waypoint
Parameters:
  • waypoint: Waypoint - Waypoint to delete.
Return Value:Nothing

Examples

Examples:
deleteWaypoint [_grp, 2]

Additional Information

See also: addWaypoint
Multiplayer: 
Problems: 

Notes





Saintolaf
In order to change the behavior of a unit currently following a string of waypoints, it is not enough to use deleteWaypoint. The path of the unit is calculated by the waypoints present at start, and the unit will continue according to the original waypoints even if you delete them by using this command.


To achieve the wanted effect, you should rather use setWPPos to the units current position (thereby stopping the unit), and (after a small delay) use deleteWaypoint to remove the waypoints.

VictorFarbau
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.


Example: Old group is "_combatgroup", new group is "_combatgroup2" _combatGroup2 = creategroup EAST; {[_x] joinSilent _combatGroup2} foreach (units _combatgroup); _combatGroup2 addWaypoint [getpos player, 25];