doMove: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (see also links to other movement commands)
m (Text replacement - "<!-- Note Section [A-Z]+ --> " to "")
(40 intermediate revisions by 11 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| ofp |= Game name
| ofp


|1.00|= Game version
|1.00


|arg= local |= Arguments in MP
|arg= local


|eff= global |= Effects in MP
|eff= global
____________________________________________________________________________________________


| Order the given unit(s) to move to the given position (without radio messages). |= Description
|gr1= Unit Control
____________________________________________________________________________________________


| unit(s) '''doMove''' position |= Syntax
| 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.


|p1= unit(s): [[Object]] or [[Array]] |= Parameter 1
| unit(s) '''doMove''' position


|p2= position: [[Array]] - format [[Position]]|= Parameter 2
|p1= unit(s): [[Object]] or [[Array]]


| [[Nothing]] |= Return value
|p2= position: [[Array]] - format [[Position]]
____________________________________________________________________________________________
 
| [[Nothing]]
   
   
|x1= <pre>_soldier1 doMove (position officer)</pre> |= Example 1
|x1= <code>_soldier1 [[doMove]] ([[position]] _officer);</code>
|x2= <pre>this doMove (getMarkerPos "Marker1")</pre> |= Example 2
|x2= <code>this [[doMove]] ([[getMarkerPos]] "Marker1");</code>
____________________________________________________________________________________________
 
| [[commandMove]], [[setDestination]], [[moveTo]], [[move]], [[addWaypoint]], [[fn_vbs_doMoveEx_(VBS2)|fn_vbs_doMoveEx]] |= See also


|seealso= [[commandMove]], [[setDestination]], [[moveTo]], [[move]], [[addWaypoint]]
}}
}}


<h3 style="display:none">Notes</h3>
<dl class="command_description">
<dl class="command_description">


<!-- Note Section BEGIN -->
<dt><dt>
 
<dd class="notedate">Posted on February 9, 2008</dd>
<dd class="notedate">Posted on February 9, 2008</dd>
<dt class="note">'''[[User:Kronzky|Kronzky]]'''</dt>
<dt class="note">[[User:Kronzky|Kronzky]]</dt>
<dd class="note">
<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.
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>


<dt><dt>
<dd class="notedate">Posted on February 3, 2009</dd>
<dd class="notedate">Posted on February 3, 2009</dd>
<dt class="note">'''[[User:General_Barron|General Barron]]'''</dt>
<dt class="note">[[User:General_Barron|General Barron]]</dt>
<dd class="note">
<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).
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.


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.
</dl>
</dd>
 
 
<!-- Note Section END -->
 


</dl>


<h3 style="display:none">Bottom Section</h3>


[[Category:Scripting Commands|DOMOVE]]
{{GameCategory|arma1|Scripting Commands}}
[[Category:Scripting Commands OFP 1.96|DOMOVE]]
{{GameCategory|arma2|Scripting Commands}}
[[Category:Scripting Commands OFP 1.46|DOMOVE]]
{{GameCategory|arma3|Scripting Commands}}
[[Category:Scripting Commands ArmA|DOMOVE]]
{{GameCategory|tkoh|Scripting Commands}}
[[Category:Command_Group:_Unit_Control|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]

Revision as of 01:32, 6 April 2021

Hover & click on the images for description

Description

Description:
Description needed
Groups:
Unit Control

Syntax

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

Examples

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

Additional Information

See also:
commandMovesetDestinationmoveTomoveaddWaypoint

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
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.