# Set Unit Color
Grammar — Set unit team color to index|Color
Flags —Native
|Action
Sets a unit’s team color.
# Arguments
unit
— Unitint
[ playercolor ] — Index
Returns — void
native void UnitSetTeamColorIndex(
unit inUnit,
int inIndex,
);
# Related
Category: Unit / Properties
- [F] —
string
[ gamelink::Unit ] — Unit Type Of Unit — ( UnitGetType ) - [F] —
int
— Unit Tag — ( UnitGetTag ) - [F] —
int
— Unit Seed — ( UnitGetSeed ) - [F] —
void
— Unit Property Changes — ( TriggerAddEventUnitProperty ) - [F] —
int
[ preset::Unit_Property ] — Triggering Unit Property — ( EventUnitProperty ) - [F] —
int
— Triggering Unit Property Change (Integer) — ( EventUnitPropertyChangeInt ) - [F] —
fixed
— Triggering Unit Property Change (Real) — ( EventUnitPropertyChangeFixed ) - [F] —
void
— Set Unit Property — ( UnitSetPropertyFixed ) - [F] —
void
— Set Unit State — ( UnitSetState ) - [F] —
void
— Set Unit Seed — ( UnitSetSeed ) - [F] —
void
— Reset Unit Seed — ( UnitResetSeed ) - [F] —
void
— Make Unit Invulnerable — ( libNtve_gf_MakeUnitInvulnerable ) - [F] —
void
— Make Unit Uncommandable — ( libNtve_gf_MakeUnitUncommandable ) - [F] —
fixed
— Unit Property — ( UnitGetPropertyFixed ) - [F] —
int
— Unit Property (Int) — ( UnitGetPropertyInt ) - [F] —
fixed
— Unit Type Property — ( UnitTypeGetProperty ) - [F] —
bool
— Unit Classification Check — ( UnitTestState ) - [F] —
bool
— Unit Type Classification Check — ( UnitTypeTestFlag ) - [F] —
bool
— Unit Type Attribute Check — ( UnitTypeTestAttribute ) - [F] —
bool
— Unit Targetable Check — ( UnitTestPlane ) - [F] —
bool
— Unit Is Invulnerable — ( libNtve_gf_UnitIsInvulnerable ) - [F] —
int
— Unit Kills — ( libNtve_gf_UnitGetPropertyKills ) - [F] —
int
— Unit Resources — ( libNtve_gf_UnitGetPropertyResources ) - [F] —
point
— Unit Attachment Point — ( UnitGetAttachmentPoint ) - [F] —
text
— Name Of Unit Type — ( UnitTypeGetName ) - [F] —
string
— Gender Code Of Unit Type — ( UnitTypeGetGenderCode ) - [F] —
int
— Unit Type Cost — ( UnitTypeGetCost ) - [F] —
bool
— Unit Type Is Affected By Upgrade — ( UnitTypeIsAffectedByUpgrade ) - [F] —
void
— Reset Movement Speed — ( UnitResetSpeed ) - [F] —
bool
— Unit Uses Mover — ( UnitMoverExists ) - [F] —
bool
— Unit Type Uses Mover — ( libNtve_gf_UnitMoverExists ) - [F] —
string
[ gamelink::Unit ] — Unit Type From String — ( UnitTypeFromString ) - [F] —
void
— Set Unit Color — ( UnitSetTeamColorIndex ) - [F] —
void
— Set Unit Info Button - Ability Tooltip — ( libNtve_gf_SetUnitInfoButtonAbilityTooltip ) - [F] —
void
— Set Unit Info Button - Button Tooltip — ( libNtve_gf_SetUnitInfoButtonButtonTooltip ) - [F] —
void
— Set Unit Info Button - Item Tooltip — ( libNtve_gf_SetUnitInfoButtonItemTooltip ) - [F] —
void
— Reset Unit Info Button - Ability Tooltip — ( libNtve_gf_ResetUnitInfoButtonAbilityTooltip ) - [F] —
void
— Reset Unit Info Button - Button Tooltip — ( libNtve_gf_ResetUnitInfoButtonButtonTooltip ) - [F] —
void
— Reset Unit Info Button - Item Tooltip — ( libNtve_gf_ResetUnitInfoButtonItemTooltip ) - [F] —
void
— Set Unit Command Button Tooltip — ( UnitSetInfoButtonTooltip ) - [F] —
void
— Reset Unit Command Button Tooltip — ( UnitClearInfoButtonTooltip ) - [F] —
void
— Set Unit Highlight Cursor — ( UnitSetCursor ) - [F] —
void
— Set Unit Ping Cursor — ( UnitSetPingCursor ) - [F] —
void
— Set Unit Info — ( UnitSetInfoText ) - [F] —
void
— Set Unit Info Text — ( UnitSetInfoText2 ) - [F] —
void
— Set Unit Info Tip — ( UnitSetInfoTip ) - [F] —
void
— Set Unit Info SubTip — ( UnitSetInfoSubTip ) - [F] —
void
— Clear Unit Info — ( UnitClearInfoText ) - [F] —
void
— Set Unit Status Bar State (Deprecated) — ( UnitForceStatusBar ) - [F] —
void
— Show Unit Status Bar — ( UnitStatusBarOverride ) - [F] —
void
— Hide Unit Status Bar — ( UnitStatusBarClearOverride ) - [F] —
void
— Set Unit Scale — ( UnitSetScale ) - [F] —
void
— Set Unit Model Variation — ( libNtve_gf_UnitSetVariation ) - [F] —
void
— Change Unit Height — ( UnitSetHeight ) - [F] —
fixed
— Height Of Unit — ( UnitGetHeight ) - [F] —
void
— Change Unit Damage — ( libNtve_gf_ChangeUnitDamage ) - [F] —
unit
— Add On Child — ( UnitAddOnChild ) - [F] —
unit
— Add On Parent — ( UnitAddOnParent )
# Examples
# campaigns/liberty.sc2campaign
// L5223
UnitSetTeamColorIndex(gv_boss, 1)
// L5673
UnitSetTeamColorIndex(gv_boss, 1)
// L1324
UnitSetTeamColorIndex(UnitLastCreated(), 10)
// L6783
UnitSetTeamColorIndex(lv_selendis, 6)
// L447
UnitSetTeamColorIndex(gv_odin, 1)
// L942
UnitSetTeamColorIndex(UnitFromId(1081), 1)
// L8171
UnitSetTeamColorIndex(gv_hercules, 1)
// L4782
UnitSetTeamColorIndex(auto8983156A_var, 1)
// L2686
UnitSetTeamColorIndex(gv_mov_Marine01, 2)
// L1770
UnitSetTeamColorIndex(auto6C9C88B3_var, 11)
// L1856
UnitSetTeamColorIndex(autoDC337D76_var, 11)
// L566
UnitSetTeamColorIndex(UnitFromId(409), 5)
// L459
UnitSetTeamColorIndex(UnitLastCreated(), gv_specialUnitColor)
// L469
UnitSetTeamColorIndex(UnitLastCreated(), gv_specialUnitColor)
// L476
UnitSetTeamColorIndex(UnitLastCreated(), gv_specialUnitColor)
// L539
UnitSetTeamColorIndex(auto56D3AD49_var, gv_specialUnitColor)
// L2764
UnitSetTeamColorIndex(EventUnit(), gv_specialUnitColor)
// L3094
UnitSetTeamColorIndex(UnitLastCreated(), gv_specialUnitColor)
// L811
UnitSetTeamColorIndex(gv_tHEONEKARASS, 6)
// L7394
UnitSetTeamColorIndex(EventUnitProgressUnit(), 2)
// L9362
UnitSetTeamColorIndex(UnitLastCreated(), 6)
// L1262
UnitSetTeamColorIndex(EventUnitProgressUnit(), 6)
// L1270
UnitSetTeamColorIndex(EventUnitProgressUnit(), 6)
// L1279
UnitSetTeamColorIndex(EventUnitProgressUnit(), 6)
// L1284
UnitSetTeamColorIndex(EventUnitProgressUnit(), 7)
// L1331
UnitSetTeamColorIndex(gv_heroMothership, 6)
// L5223
UnitSetTeamColorIndex(gv_boss, 1)
// L5673
UnitSetTeamColorIndex(gv_boss, 1)
// L1324
UnitSetTeamColorIndex(UnitLastCreated(), 10)
// L6783
UnitSetTeamColorIndex(lv_selendis, 6)
// L447
UnitSetTeamColorIndex(gv_odin, 1)
// L942
UnitSetTeamColorIndex(UnitFromId(1081), 1)
// L8171
UnitSetTeamColorIndex(gv_hercules, 1)
// L4782
UnitSetTeamColorIndex(auto8983156A_var, 1)
// L2686
UnitSetTeamColorIndex(gv_mov_Marine01, 2)
// L1770
UnitSetTeamColorIndex(auto6C9C88B3_var, 11)
// L1856
UnitSetTeamColorIndex(autoDC337D76_var, 11)
// L566
UnitSetTeamColorIndex(UnitFromId(409), 5)
// L459
UnitSetTeamColorIndex(UnitLastCreated(), gv_specialUnitColor)
// L469
UnitSetTeamColorIndex(UnitLastCreated(), gv_specialUnitColor)
// L476
UnitSetTeamColorIndex(UnitLastCreated(), gv_specialUnitColor)
// L539
UnitSetTeamColorIndex(auto56D3AD49_var, gv_specialUnitColor)
// L2764
UnitSetTeamColorIndex(EventUnit(), gv_specialUnitColor)
// L3094
UnitSetTeamColorIndex(UnitLastCreated(), gv_specialUnitColor)
// L811
UnitSetTeamColorIndex(gv_tHEONEKARASS, 6)
// L7394
UnitSetTeamColorIndex(EventUnitProgressUnit(), 2)
// L9362
UnitSetTeamColorIndex(UnitLastCreated(), 6)
// L1262
UnitSetTeamColorIndex(EventUnitProgressUnit(), 6)
// L1270
UnitSetTeamColorIndex(EventUnitProgressUnit(), 6)
// L1279
UnitSetTeamColorIndex(EventUnitProgressUnit(), 6)
// L1284
UnitSetTeamColorIndex(EventUnitProgressUnit(), 7)
// L1331
UnitSetTeamColorIndex(gv_heroMothership, 6)
# campaigns/libertystory.sc2campaign
// L454
UnitSetTeamColorIndex(UnitLastCreated(), 4)
# campaigns/swarm.sc2campaign
// L756
UnitSetTeamColorIndex(lv_localHybrid, 1)
// L842
UnitSetTeamColorIndex(auto09291B66_var, PlayerGetColorIndex(gv_pLAYER_02_ZERG, false))
// L5221
UnitSetTeamColorIndex(gv_introEggs, 14)
// L5712
UnitSetTeamColorIndex(auto1CE342C4_var, 14)
// L952
UnitSetTeamColorIndex(UnitFromId(54), libSwaC_gf_CampaignKerriganZergPlayerColor())
// L811
UnitSetTeamColorIndex(lp_cHOSEN_UNIT, PlayerGetColorIndex(gv_pLAYER_01_USER, false))
// L1001
UnitSetTeamColorIndex(UnitFromId(308), 14)
// L1002
UnitSetTeamColorIndex(UnitFromId(23), 7)
// L1003
UnitSetTeamColorIndex(UnitFromId(307), 2)
// L1004
UnitSetTeamColorIndex(UnitFromId(309), 5)
// L871
UnitSetTeamColorIndex(UnitFromId(1800), 5)
// L1322
UnitSetTeamColorIndex(gv_vALERIAN, 1)
// L10045
UnitSetTeamColorIndex(UnitLastCreated(), 6)
// L10411
UnitSetTeamColorIndex(UnitLastCreated(), 6)
// L1044
UnitSetTeamColorIndex(gv_kerrigan, 6)
// L1196
UnitSetTeamColorIndex(auto1608AAF4_var, 1)
// L11137
UnitSetTeamColorIndex(UnitLastCreated(), 6)
// L12716
UnitSetTeamColorIndex(UnitLastCreated(), 1)
// L1335
UnitSetTeamColorIndex(UnitFromId(254), 2)
// L1339
UnitSetTeamColorIndex(UnitFromId(254), 2)
// L8309
UnitSetTeamColorIndex(UnitFromId(254), 2)
// L8345
UnitSetTeamColorIndex(gv_kerrigan, 6)
// L8377
UnitSetTeamColorIndex(autoDE0F1553_var, 7)
// L8438
UnitSetTeamColorIndex(auto7032D3FD_var, 6)
// L8445
UnitSetTeamColorIndex(autoC44D0DB5_var, 1)
// L8447
UnitSetTeamColorIndex(UnitFromId(254), 2)
// L8606
UnitSetTeamColorIndex(UnitFromId(254), 2)
// L8623
UnitSetTeamColorIndex(auto84C1C953_var, 6)
// L8929
UnitSetTeamColorIndex(UnitLastCreated(), 4)
// L534
UnitSetTeamColorIndex(UnitGroupLoopCurrent(), 5)
// L543
UnitSetTeamColorIndex(UnitGroupLoopCurrent(), 5)
// L534
UnitSetTeamColorIndex(UnitGroupLoopCurrent(), 5)
// L543
UnitSetTeamColorIndex(UnitGroupLoopCurrent(), 5)
// L842
UnitSetTeamColorIndex(auto09291B66_var, PlayerGetColorIndex(gv_pLAYER_02_ZERG, false))
// L5221
UnitSetTeamColorIndex(gv_introEggs, 14)
// L5712
UnitSetTeamColorIndex(auto1CE342C4_var, 14)
// L952
UnitSetTeamColorIndex(UnitFromId(54), libSwaC_gf_CampaignKerriganZergPlayerColor())
// L811
UnitSetTeamColorIndex(lp_cHOSEN_UNIT, PlayerGetColorIndex(gv_pLAYER_01_USER, false))
// L1001
UnitSetTeamColorIndex(UnitFromId(308), 14)
// L1002
UnitSetTeamColorIndex(UnitFromId(23), 7)
// L1003
UnitSetTeamColorIndex(UnitFromId(307), 2)
// L1004
UnitSetTeamColorIndex(UnitFromId(309), 5)
// L871
UnitSetTeamColorIndex(UnitFromId(1800), 5)
// L1322
UnitSetTeamColorIndex(gv_vALERIAN, 1)
// L10045
UnitSetTeamColorIndex(UnitLastCreated(), 6)
// L10411
UnitSetTeamColorIndex(UnitLastCreated(), 6)
// L1044
UnitSetTeamColorIndex(gv_kerrigan, 6)