{"name":"doMove","title":"doMove","type":"command","url":"https://community.bistudio.com/wiki/doMove","revid":379415,"updated":"2026-10-31T00:03:29Z","groups":["Unit Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"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.","syntaxes":[{"syntax":"unit(s) doMove position","params":[{"name":"unit(s)","type":"Object or Array of Objects","type_expr":"Object | Array<Object>"},{"name":"position","type":"Position","type_expr":"Position"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit(s)"},"right":{"text":"position"}}],"examples":[{"code":["_soldier1 doMove (position _officer);"]},{"code":["this doMove (getMarkerPos \"Marker1\");"]}],"see_also":["commandMove","setDestination","moveTo","move","addWaypoint"],"notes":[{"user":"Kronzky","date":"2008-02-09T00:00:00Z","text":"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."},{"user":"General_Barron","date":"2009-02-03T00:00:00Z","text":"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).\nThere 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."},{"user":"DreadedEntity","date":"2022-04-02T15:22:26Z","text":"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)"},{"user":"DreadedEntity","date":"2022-04-02T20:35:58Z","text":"If you need your script to halt until the unit has reached it's destination, waitUntil and moveToCompleted will come in handy:\n\n```sqf\n_unit doMove _pos;\nwaitUntil {moveToCompleted _unit};\n```\n\nThis also works with commandMove"},{"user":"Waffle SS.","date":"2022-07-25T06:25:19Z","text":"Seems to use PositionATL, which may be important if the destination is above a building's 1st floor."}]}