deleteWaypoint

From Bohemia Interactive Community
Revision as of 02:23, 15 November 2008 by victorfarbau (talk | contribs) (→‎==)
Jump to navigation Jump to search
-wrong parameter ("Arma") defined!-1.00
Hover & click on the images for description

Description

Description:
Removes the waypoint.
Groups:
Uncategorised

Syntax

Syntax:
deleteWaypoint [[[Group]],index]
Parameters:
Group
index: Number
Return Value:
Nothing

Examples

Example 1:
deleteWaypoint [_grp, 2]

Additional Information

See also:
addWaypoint

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Notes

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 acchieve 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 (foolproof) method to avoid the problem of non deleteable waypoints is to introduce another group (createGroup) and join all units of the present group. The new group will have no assigned waypoints and you can start setting new WPs.

Example: Old group is "_combatgroup", new group is "_combatgroup2"

================================================

_combatGroup2 = creategroup EAST; {[_x] joinSilent _combatGroup2} foreach (units _combatgroup);

=================================================

Bottom Section