Jump to navigation Jump to search
- Order the given unit(s) to move to the given position (without radio messages). Upon reaching its destination, if it is the group leader it will order the group to form around it's new position. If it is not the leader, it will immediately be ordered to return to formation by the group leader and begin moving back to the group. Use doStop to stop units returning to formation. moveToCompleted will return true when a unit issued this command reaches its destination.
- Unit Control
- unit(s) doMove position
- unit(s): Object or Array
- position: Array - format Position
- Return Value:
- Example 1:
- Example 2:
- Posted on February 9, 2008
- If doMove is to be used in conjunction with waypoint behavior commands (e.g. setSpeedMode), then those have to be issued after the move command to have an effect. Otherwise the move will be done with the default settings.
- Posted on February 3, 2009
- General Barron
- If a unit is part of a group, and is not the leader, the unit will fall back into formation soon after the domove is completed. This does not happen for units that are in a group alone (because they are their own leader). There is no single command to get a unit to move to a position and stay there. The best way to do this is to issue a domove, then wait for the unit to reach his destination, then disable his movement AI.
- Posted on Apr 02, 2022 - 15:22 (UTC)
- The above note is only true of units which group leader is not the player. Player-squad will remain in position until given another order (A3 v2.08.149102)
- Posted on Apr 02, 2022 - 20:35 (UTC)
- If you need your script to halt until the unit has reached it's destination, waitUntil and moveToCompleted will come in handy: commandMove
- Posted on Jul 25, 2022 - 06:25 (UTC)
- Seems to use PositionATL, which may be important if the destination is above a building's 1st floor.