Difference between revisions of "doMove"

From Bohemia Interactive Community
Jump to navigation Jump to search
m (template:command argument fix)
(40 intermediate revisions by 14 users not shown)
Line 1: Line 1:
[[Category:Scripting Commands|D]]
+
{{Command|= Comments
[[Category:Scripting Commands OFP 1.97|D]]
+
____________________________________________________________________________________________
[[Category:Scripting Commands OFP 1.46|D]]
 
[[Category:Scripting Commands ArmA|D]]
 
  
 +
| ofp |= Game name
  
<h2 style="color:#000066">'''doMove ''postion'''''</h2>
+
|1.00|= Game version
  
 +
|arg= local |= Arguments in MP
  
'''Operand types:'''
+
|eff= global |= Effects in MP
 +
____________________________________________________________________________________________
  
'''position:''' [[Array]]
+
| Order the given unit(s) to move to the given position (without radio messages). After reaching his destination, the unit will immediately return to formation (if in a group); or order his group to form around his new position (if a group leader). Use [[doStop]] to stop units returning to formation. |DESCRIPTION=
 +
____________________________________________________________________________________________
  
'''Type of returned value:'''
+
| unit(s) '''doMove''' position |SYNTAX=
  
[[Nothing]]
+
|p1= unit(s): [[Object]] or [[Array]] |PARAMETER1=
  
'''Description:'''
+
|p2= position: [[Array]] - format [[Position]]|PARAMETER2=
  
Order unit to move to given position (format [[Position]]) (silent).
+
| [[Nothing]] |RETURNVALUE=
 +
____________________________________________________________________________________________
 +
 
 +
|x1= <code>_soldier1 [[doMove]] ([[position]] _officer);</code> |EXAMPLE1=
 +
|x2= <code>this [[doMove]] ([[getMarkerPos]] "Marker1");</code> |EXAMPLE2=
 +
____________________________________________________________________________________________
  
 +
| [[commandMove]], [[setDestination]], [[moveTo]], [[move]], [[addWaypoint]] |SEEALSO=
  
'''Example:'''
+
}}
  
soldierOne '''doMove''' [[getMarkerPos]] "MarkerMoveOne"
+
<h3 style="display:none">Notes</h3>
 +
<dl class="command_description">
 +
 
 +
<!-- Note Section BEGIN -->
 +
 
 +
<dd class="notedate">Posted on February 9, 2008
 +
<dt class="note">'''[[User:Kronzky|Kronzky]]'''
 +
<dd class="note">
 +
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.
 +
 
 +
 
 +
<dd class="notedate">Posted on February 3, 2009
 +
<dt class="note">'''[[User:General_Barron|General Barron]]'''
 +
<dd class="note">
 +
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. VBS2 users can use the [[fn_vbs_doMoveEx_(VBS2)|fn_vbs_doMoveEx]] function.
 +
<!-- Note Section END -->
 +
 
 +
 
 +
</dl>
 +
 
 +
<h3 style="display:none">Bottom Section</h3>
 +
 
 +
[[Category:Scripting Commands|DOMOVE]]
 +
[[Category:Scripting Commands OFP 1.99|DOMOVE]]
 +
[[Category:Scripting Commands OFP 1.96|DOMOVE]]
 +
[[Category:Scripting Commands OFP 1.46|DOMOVE]]
 +
[[Category:Scripting Commands ArmA|DOMOVE]]
 +
[[Category:Command_Group:_Unit_Control|{{uc:{{PAGENAME}}}}]]
 +
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
 +
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
 +
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]

Revision as of 14:38, 7 April 2019

Introduced with Operation Flashpoint version1.00
  Arguments of this scripting command have to be local to the client the command is executed onEffects of this scripting command are broadcasted over the network and happen on every computer in the network

Click on the images for descriptions

Introduced in

Game:
Operation Flashpoint
Version:
1.00

Description

Description:
Order the given unit(s) to move to the given position (without radio messages). After reaching his destination, the unit will immediately return to formation (if in a group); or order his group to form around his new position (if a group leader). Use doStop to stop units returning to formation.

Syntax

Syntax:
unit(s) doMove position
Parameters:
unit(s): Object or Array
position: Array - format Position
Return Value:
Nothing

Examples

Example 1:
_soldier1 doMove (position _officer);
Example 2:
this doMove (getMarkerPos "Marker1");

Additional Information

Multiplayer:
-
See also:
commandMovesetDestinationmoveTomoveaddWaypoint

Notes

Only post proven facts here. Report bugs on the feedback tracker. Use the talk page or the forums for discussions.
Add New Note | How To

Notes

Posted on February 9, 2008
Kronzky
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. VBS2 users can use the fn_vbs_doMoveEx function.

Bottom Section