{"name":"doMove","operator":null,"title":"doMove","type":"command","url":"https://community.bistudio.com/wiki/doMove","revid":377517,"updated":"2026-01-02T06:52:02Z","groups":["Unit Control"],"status":"ok","replaced_by":[],"games":[{"game":"ofp","name":"Operation Flashpoint","version":"1.00"},{"game":"ofpe","name":"Operation Flashpoint: Elite","version":"1.00"},{"game":"arma1","name":"Armed Assault","version":"1.00"},{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"ofp","name":"Operation Flashpoint","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":"local","effect":"global","server_exec":false},"exec":null,"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","since":null,"effect":null,"exec":null,"params":[{"name":"unit(s)","type":"Object or Array of Objects","optional":false,"default":null,"description":null,"types":["Object","Array"],"since":null,"text":"unit(s): Object or Array of Objects"},{"name":"position","type":"Position","optional":false,"default":null,"description":null,"types":["Position"],"since":null,"text":"position: Position"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"unit(s)","types":["Object","Array"]},"right":{"text":"position","types":["Position"]}}],"examples":[{"text":"```sqf\n_soldier1 doMove (position _officer);\n```","code":["_soldier1 doMove (position _officer);"]},{"text":"```sqf\nthis doMove (getMarkerPos \"Marker1\");\n```","code":["this doMove (getMarkerPos \"Marker1\");"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["commandMove","setDestination","moveTo","move","addWaypoint"],"notes":[{"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."}],"categories":["ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Unit Control","Introduced with Operation Flashpoint version 1.00","Operation Flashpoint: Elite: Scripting Commands","Operation Flashpoint: New Scripting Commands","Operation Flashpoint: Scripting Commands","Scripting Commands","Scripting Commands: Global Effect","Take On Helicopters: Scripting Commands"]}