deleteWaypoint: Difference between revisions
Jump to navigation
Jump to search
victorfarbau (talk | contribs) (→==) |
m (global args, global effect, made notes pretty) |
||
Line 5: | Line 5: | ||
|1.00|= Game version | |1.00|= Game version | ||
|arg= global |= Arguments in MP | |||
|eff= global |= Effects in MP | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| Removes the waypoint. |= Description | | Removes the specified waypoint. |= Description | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| '''deleteWaypoint''' [[[Group]],index] |= Syntax | | '''deleteWaypoint''' <nowiki>[</nowiki>[[Group]], index<nowiki>]</nowiki> |= Syntax | ||
|p1= [[Group]] |= Parameter 1 | |p1= [[Group]] |= Parameter 1 | ||
Line 28: | Line 32: | ||
<dl class="command_description"> | <dl class="command_description"> | ||
<!-- Note Section BEGIN --> | <!-- Note Section BEGIN --> | ||
<dd class="notedate"></dd> | |||
<dt class="note">'''[[User:Saintolaf|Saintolaf]]''' | |||
</dt><dd class="note"> | |||
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. | 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 | 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.</dd> | ||
<dd class="notedate"></dd> | |||
<dt class="note">'''[[User:VictorFarbau|VictorFarbau]]''' | |||
</dt><dd class="note"> | |||
[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. | 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: | Example: | ||
Old group is "_combatgroup", new group is "_combatgroup2" | Old group is "_combatgroup", new group is "_combatgroup2" | ||
<code>_combatGroup2 = creategroup EAST; | |||
_combatGroup2 = creategroup EAST; | |||
{[_x] joinSilent _combatGroup2} foreach (units _combatgroup); | {[_x] joinSilent _combatGroup2} foreach (units _combatgroup); | ||
_combatGroup2 addWaypoint [getpos player, 25];</code> | |||
_combatGroup2 addWaypoint [getpos player, 25]; | </dd> | ||
<!-- Note Section END --> | <!-- Note Section END --> | ||
</dl> | </dl> |
Revision as of 11:30, 26 November 2008
Description
- Description:
- Removes the specified waypoint.
- Groups:
- Uncategorised
Syntax
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
- 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];