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
.- return type
nothing
- Source code
native SetUnitOwner takes unit whichUnit, player whichPlayer, boolean changeColor returns nothing
- Source
- common.j
- wc3modding.com
- SetUnitOwner