SetUnitOwner

Parameters
whichUnit unit

Unit to modify.

whichPlayer player

The unit's new owner.

changeColor boolean

True to change unit's accent color to new owner's color, false to leave old color.

comment

Changes ownership of a unit.

note

Reforged: The HP bar will always have the color of its owner player, regardless of changeColor.

note

See: GetOwningPlayer, Player.

patch

1.00

Source
common.j
return type
nothing
Source code
native          SetUnitOwner        takes unit whichUnit, player whichPlayer, boolean changeColor returns nothing