SetUnitPosition

Parameters
whichUnit unit
newX real
newY real
comment

Sets new unit location, respecting pathing rules like terrain.

note

This cancels the orders of the unit by issuing order "stop" (851972). This is done to force-teleport the unit to a valid pathing position. If you want to move a unit without canceling its orders use SetUnitX/SetUnitY.

note

See: SetUnitX (with example code), SetUnitPositionLoc

patch

1.00

Source
common.j (suggest an edit or discuss on Github)
return type
nothing
Source code
native          SetUnitPosition     takes unit whichUnit, real newX, real newY returns nothing