Difference between revisions of "doMove"

From Bohemia Interactive Community
Jump to navigation Jump to search
m (changed global to local variable to make clear the variable)
m (template:command argument fix)
(21 intermediate revisions by 10 users not shown)
Line 6: Line 6:
 
|1.00|= Game version
 
|1.00|= Game version
  
|arg= global |= Arguments in MP
+
|arg= local |= Arguments in MP
  
 
|eff= global |= Effects in MP
 
|eff= global |= Effects in MP
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
| Order the given unit(s) to move to the given position (without radio messages). |= 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. |DESCRIPTION=
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
|[[Object#Unit(s)|Unit(s)]] '''doMove''' [[Position]] |= Syntax
+
| unit(s) '''doMove''' position |SYNTAX=
  
|p1= [[Object#Unit(s)|Unit(s)]] |= Parameter 1
+
|p1= unit(s): [[Object]] or [[Array]] |PARAMETER1=
  
|p2= [[Position]]|= Parameter 2
+
|p2= position: [[Array]] - format [[Position]]|PARAMETER2=
  
| [[Nothing]] |= Return value
+
| [[Nothing]] |RETURNVALUE=
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
 
   
 
   
|x1= <pre>_soldier1 doMove (position officer)</pre> |= Example 1
+
|x1= <code>_soldier1 [[doMove]] ([[position]] _officer);</code> |EXAMPLE1=
|x2= <pre>this doMove (getMarkerPos "Marker1")</pre> |= Example 2
+
|x2= <code>this [[doMove]] ([[getMarkerPos]] "Marker1");</code> |EXAMPLE2=
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
| [[commandMove]] |= See also
+
| [[commandMove]], [[setDestination]], [[moveTo]], [[move]], [[addWaypoint]] |SEEALSO=
  
 
}}
 
}}
Line 36: Line 36:
 
<!-- Note Section BEGIN -->
 
<!-- Note Section BEGIN -->
  
<dd class="notedate">Posted on July 3, 2007 - 14:32</dd>
+
<dd class="notedate">Posted on February 9, 2008
<dt class="note">'''[[User:Praxtor|Praxtor]]'''</dt><dd class="note">''Notes from before the conversion:''
+
<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.
  
If the distance between the Object and the Ia is more than 100 Meters, the command dont work, the Ia stay stoped.
 
</dd>
 
  
 +
<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 -->
 
<!-- Note Section END -->
  
Line 50: Line 55:
  
 
[[Category:Scripting Commands|DOMOVE]]
 
[[Category:Scripting Commands|DOMOVE]]
 +
[[Category:Scripting Commands OFP 1.99|DOMOVE]]
 
[[Category:Scripting Commands OFP 1.96|DOMOVE]]
 
[[Category:Scripting Commands OFP 1.96|DOMOVE]]
 
[[Category:Scripting Commands OFP 1.46|DOMOVE]]
 
[[Category:Scripting Commands OFP 1.46|DOMOVE]]
 
[[Category:Scripting Commands ArmA|DOMOVE]]
 
[[Category:Scripting Commands ArmA|DOMOVE]]
 
[[Category:Command_Group:_Unit_Control|{{uc:{{PAGENAME}}}}]]
 
[[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 15:38, 7 April 2019

Template:Command

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