# Set Player Color
Grammar — Set player player color to color (changeUnits the color of existing units)
Flags —Native
|Action
Sets the player color for the player.
# Arguments
int
— Playerint
[ playercolor ] — Colorbool
[ preset::ChangeRetainOption ] — Change/Retain
Returns — void
native void PlayerSetColorIndex(
int inPlayer,
int inIndex,
bool inChangeUnits,
);
# Related
Category: Player / Player Settings
- [F] —
void
— Modify Player Property (Integer) — ( PlayerModifyPropertyInt ) - [F] —
void
— Modify Player Property (Real) — ( PlayerModifyPropertyFixed ) - [F] —
int
— Player Property (Integer) — ( PlayerGetPropertyInt ) - [F] —
fixed
— Player Property (Real) — ( PlayerGetPropertyFixed ) - [F] —
void
— Modify Player Score (Integer) — ( PlayerScoreValueSetFromInt ) - [F] —
void
— Modify Player Score (Real) — ( PlayerScoreValueSetFromFixed ) - [F] —
int
— Player Score Value (Integer) — ( PlayerScoreValueGetAsInt ) - [F] —
fixed
— Player Score Value (Real) — ( PlayerScoreValueGetAsFixed ) - [F] —
void
— Turn Player Flag On/Off — ( PlayerSetState ) - [F] —
bool
— Player Flag Check — ( PlayerGetState ) - [F] —
bool
— Player License Check — ( PlayerHasLicense ) - [F] —
bool
— Player Access Check — ( PlayerHasAccessTo ) - [F] —
bool
— Player Has Reward — ( PlayerHasReward ) - [F] —
bool
— Player Has Talent — ( PlayerHasTalent ) - [F] —
text
— Name Of Player — ( PlayerName ) - [F] —
string
— Handle Of Player — ( PlayerHandle ) - [F] —
string
[ gamelink::Race ] — Race Of Player — ( PlayerRace ) - [F] —
string
[ gamelink::Hero ] — Hero Of Player — ( PlayerHero ) - [F] —
string
[ gamelink::Skin ] — Skin Of Player — ( PlayerSkin ) - [F] —
string
[ gamelink::Mount ] — Mount Of Player — ( PlayerMount ) - [F] —
string
[ gamelink::Spray ] — Spray Of Player — ( PlayerSpray ) - [F] —
string
[ gamelink::Artifact ] — Artifact Of Player — ( PlayerArtifact ) - [F] —
int
— Artifact Rank Of Player — ( PlayerArtifactRank ) - [F] —
string
[ gamelink::Commander ] — Commander Of Player — ( PlayerCommander ) - [F] —
int
— Commander Level Of Player — ( PlayerCommanderLevel ) - [F] —
int
— Commander Mastery Level Of Player — ( PlayerCommanderMasteryLevel ) - [F] —
int
— Commander Mastery Talent Rank Of Player — ( PlayerCommanderMasteryTalentRank ) - [F] —
int
— Commander Selected Prestige Of Player — ( PlayerCommanderSelectedPrestige ) - [F] —
int
— Brutal Plus Difficulty of Player — ( PlayerBrutalPlusDifficulty ) - [F] —
int
— Retry Mutation Index of Player — ( PlayerRetryMutation ) - [F] —
int
— Allied Commander Enemy Wave Type — ( PlayerACEnemyWaveType ) - [F] —
point
— Start Location Of Player — ( PlayerStartLocation ) - [F] —
int
[ preset::PlayerController ] — Controller Of Player — ( PlayerType ) - [F] —
int
[ preset::PlayerStatus ] — Status Of Player — ( PlayerStatus ) - [F] —
void
— Set Player Color — ( PlayerSetColorIndex ) - [F] —
void
— Set Player Race — ( PlayerSetRace ) - [F] —
void
— Set Player Hero — ( PlayerSetHero ) - [F] —
void
— Set Player Skin — ( PlayerSetSkin ) - [F] —
void
— Set Player Console Skin — ( PlayerSetConsoleSkin ) - [F] —
void
— Apply Player Skin — ( PlayerApplySkin ) - [F] —
void
— Apply Player Skin (Replacing Existing Unit) — ( libNtve_gf_PlayerApplySkinReplacingExistingUnit ) - [F] —
void
— Set Player Mount — ( PlayerSetMount ) - [F] —
void
— Set Player Spray — ( PlayerSetSpray ) - [F] —
void
— Set Player Commander — ( PlayerSetCommander ) - [F] —
void
— Set Player Commander Level — ( PlayerSetCommanderLevel ) - [F] —
void
— Set Player Commander Mastery Level — ( PlayerSetCommanderMasteryLevel ) - [F] —
void
— Set Player Death Timer — ( PlayerSetDeathTimer ) - [F] —
void
— Set Player Bounds — ( PlayerSetBounds ) - [F] —
void
— Add Player Talent — ( PlayerAddTalent ) - [F] —
void
— Remove Player Talent — ( PlayerRemoveTalent ) - [F] —
void
— Add Player Response — ( PlayerAddResponse ) - [F] —
void
— Remove Player Response — ( PlayerRemoveResponse ) - [F] —
void
— Clear Player Response — ( PlayerClearResponse ) - [F] —
int
[ playercolor ] — Player Color — ( PlayerGetColorIndex ) - [F] —
void
— Override Player Option — ( PlayerOptionOverride ) - [F] —
string
— Player Hotkey Profile — ( PlayerGetHotkeyProfile ) - [F] —
void
— Player Property Changed — ( TriggerAddEventPlayerPropChange ) - [F] —
void
— Player Joins Game — ( TriggerAddEventPlayerJoin ) - [F] —
void
— Player Leaves Game — ( TriggerAddEventPlayerLeft ) - [F] —
int
— Triggering Player — ( EventPlayer ) - [F] —
int
[ preset::Player_Property_Get ] — Triggering Player Property — ( EventPlayerProperty ) - [F] —
int
— Triggering Player Property Change (Integer) — ( EventPlayerPropertyChangeInt ) - [F] —
fixed
— Triggering Player Property Change (Real) — ( EventPlayerPropertyChangeFixed ) - [F] —
void
— Player Add Label — ( PlayerAddLabel ) - [F] —
void
— Player Remove Label — ( PlayerRemoveLabel ) - [F] —
void
— Player Remove All Labels — ( PlayerRemoveAllLabels ) - [F] —
bool
— Player Has Label — ( PlayerHasLabel ) - [F] —
void
— Player Add Reward — ( PlayerAddReward )
# Examples
# campaigns/liberty.sc2campaign
// L722
PlayerSetColorIndex(gv_p2_ENEMY, 2, true)
// L864
PlayerSetColorIndex(gv_p2_ENEMY, 1, true)
// L1191
PlayerSetColorIndex(gv_p2_ENEMY, 1, true)
// L940
PlayerSetColorIndex(gv_p02_ZERG_EAST, 4, true)
// L941
PlayerSetColorIndex(gv_p03_VIROPHAGE, 4, true)
// L942
PlayerSetColorIndex(gv_p04_ZERG_NORTH, 4, true)
// L943
PlayerSetColorIndex(gv_p05_COLONIST, 0, true)
// L944
PlayerSetColorIndex(gv_p06_COLONIST, 0, true)
// L945
PlayerSetColorIndex(gv_p07_ZERG_INFESTED, 4, true)
// L946
PlayerSetColorIndex(gv_p08_ZERG_SOUTH, 4, true)
// L692
PlayerSetColorIndex(gv_pLAYER_02_DOMINION, 1, true)
// L693
PlayerSetColorIndex(gv_pLAYER_03_DOMINION, 1, true)
// L694
PlayerSetColorIndex(gv_pLAYER_04_DOMINION, 1, true)
// L695
PlayerSetColorIndex(gv_pLAYER_06_TRAIN, 1, true)
// L395
PlayerSetColorIndex(auto317FADF5_var, 1, true)
// L858
PlayerSetColorIndex(gv_p03_DOMINION_SIEGE, 1, true)
// L859
PlayerSetColorIndex(gv_p04_DOMINION_AIR, 1, true)
// L860
PlayerSetColorIndex(gv_p05_DOMINION_RAIDER, 1, true)
// L592
PlayerSetColorIndex(gv_pLAYER03_ZERG, 4, true)
// L593
PlayerSetColorIndex(gv_pLAYER04_ZERG, 4, true)
// L359
PlayerSetColorIndex(gv_p04_ZERG, 4, true)
// L725
PlayerSetColorIndex(autoA366C10A_var, 3, true)
// L626
PlayerSetColorIndex(gv_p4_DOMINION_PURPLE, 1, true)
// L627
PlayerSetColorIndex(gv_p5_DOMINION_GREY, 1, true)
// L628
PlayerSetColorIndex(gv_p6_DOMINION_ORANGE, 1, true)
// L629
PlayerSetColorIndex(gv_p8_ALLIED_PINK, 3, true)
// L630
PlayerSetColorIndex(gv_p9_ALLIED_GREEN, 3, true)
// L631
PlayerSetColorIndex(gv_p11_ALLIED_CELLBLOCK_A, 3, true)
// L632
PlayerSetColorIndex(gv_p12_ALLIED_CELLBLOCK_B, 3, true)
// L461
PlayerSetColorIndex(auto09E5D80C_var, 3, true)
// L580
PlayerSetColorIndex(gv_p02_ZERG, 4, true)
// L581
PlayerSetColorIndex(gv_p05_ZERG_BASE, 4, true)
// L582
PlayerSetColorIndex(gv_p07_ZERG_KERRIGAN, 4, true)
// L333
PlayerSetColorIndex(gv_pLAYER02_PROTOSS, 3, true)
// L334
PlayerSetColorIndex(gv_pLAYER03_PROTOSS, 3, true)
// L335
PlayerSetColorIndex(gv_pLAYER04_PROTOSS, 3, true)
// L441
PlayerSetColorIndex(gv_pLAYER_02_ScriptedTOSS, 3, true)
// L442
PlayerSetColorIndex(gv_pLAYER_03_HighTOSS, 3, true)
// L443
PlayerSetColorIndex(gv_pLAYER_04_DarkTOSS, 3, true)
// L444
PlayerSetColorIndex(gv_pLAYER_05_WORLDSHIP, 1, true)
// L914
PlayerSetColorIndex(gv_p02_ZERG_PURPLE_NE, 4, true)
// L915
PlayerSetColorIndex(gv_p05_ZERG_ORANGE_NW, 4, true)
// L916
PlayerSetColorIndex(gv_p06_ZERG_GREEN_SW, 4, true)
// L917
PlayerSetColorIndex(gv_p07_ZERG_PINK, 4, true)
// L918
PlayerSetColorIndex(gv_p10_ZERG_WHITEHIVE, 4, true)
// L919
PlayerSetColorIndex(gv_p11_ZERG_YELLOWSPORECANNON, 4, true)
// L6577
PlayerSetColorIndex(gv_p01_USER, 1, true)
// L750
PlayerSetColorIndex(gv_p2_ZERG, 4, true)
// L751
PlayerSetColorIndex(gv_p5_EGGS, 4, true)
// L682
PlayerSetColorIndex(gv_pLAYER_P03_ZERG_BR, 4, true)
// L683
PlayerSetColorIndex(gv_pLAYER_P04_ZERG_BL, 4, true)
// L684
PlayerSetColorIndex(gv_pLAYER_P05_ZERG_TL, 4, true)
// L685
PlayerSetColorIndex(gv_pLAYER_P06_ZERG_TR, 4, true)
// L686
PlayerSetColorIndex(gv_pLAYER_P07_ZERG_EXP, 4, true)
// L687
PlayerSetColorIndex(gv_pLAYER_P08_MUTALISK_TOWERS, 4, true)
// L789
PlayerSetColorIndex(gv_pLAYER_ZERG_SOUTH, 4, true)
// L790
PlayerSetColorIndex(gv_pLAYER_ZERG_EAST, 4, true)
// L791
PlayerSetColorIndex(gv_pLAYER_ZERG_SPECIAL, 4, true)
// L582
PlayerSetColorIndex(gv_p4_RUNOUT_ZERG, 4, true)
// L590
PlayerSetColorIndex(gv_p2_PROTOSS_STALKER, 7, true)
// L591
PlayerSetColorIndex(gv_p3_PROTOSS_ENEMY, 7, true)
// L592
PlayerSetColorIndex(gv_p4_PROTOSS_ENEMY, 7, true)
// L593
PlayerSetColorIndex(gv_p6_PROTOSS_ENEMY, 7, true)
// L432
PlayerSetColorIndex(gv_p03_ZERG_NORTH, 4, true)
// L433
PlayerSetColorIndex(gv_p04_ZERG_EAST, 4, true)
// L434
PlayerSetColorIndex(gv_p05_ZERG_LOW_GROUND_NOAI, 4, true)
// L446
PlayerSetColorIndex(gv_p04_ZERG_NW, 4, true)
// L447
PlayerSetColorIndex(gv_p05_ZERG_NE, 4, true)
// L448
PlayerSetColorIndex(gv_p06_ZERG_SE, 4, true)
// L449
PlayerSetColorIndex(gv_p07_FRENZIED_ZERG, 4, true)
// L722
PlayerSetColorIndex(gv_p2_ENEMY, 2, true)
// L864
PlayerSetColorIndex(gv_p2_ENEMY, 1, true)
// L1191
PlayerSetColorIndex(gv_p2_ENEMY, 1, true)
// L940
PlayerSetColorIndex(gv_p02_ZERG_EAST, 4, true)
// L941
PlayerSetColorIndex(gv_p03_VIROPHAGE, 4, true)
// L942
PlayerSetColorIndex(gv_p04_ZERG_NORTH, 4, true)
// L943
PlayerSetColorIndex(gv_p05_COLONIST, 0, true)
// L944
PlayerSetColorIndex(gv_p06_COLONIST, 0, true)
// L945
PlayerSetColorIndex(gv_p07_ZERG_INFESTED, 4, true)
// L946
PlayerSetColorIndex(gv_p08_ZERG_SOUTH, 4, true)
// L692
PlayerSetColorIndex(gv_pLAYER_02_DOMINION, 1, true)
// L693
PlayerSetColorIndex(gv_pLAYER_03_DOMINION, 1, true)
// L694
PlayerSetColorIndex(gv_pLAYER_04_DOMINION, 1, true)
// L695
PlayerSetColorIndex(gv_pLAYER_06_TRAIN, 1, true)
// L395
PlayerSetColorIndex(auto317FADF5_var, 1, true)
// L858
PlayerSetColorIndex(gv_p03_DOMINION_SIEGE, 1, true)
// L859
PlayerSetColorIndex(gv_p04_DOMINION_AIR, 1, true)
// L860
PlayerSetColorIndex(gv_p05_DOMINION_RAIDER, 1, true)
// L592
PlayerSetColorIndex(gv_pLAYER03_ZERG, 4, true)
// L593
PlayerSetColorIndex(gv_pLAYER04_ZERG, 4, true)
// L359
PlayerSetColorIndex(gv_p04_ZERG, 4, true)
// L725
PlayerSetColorIndex(autoA366C10A_var, 3, true)
// L626
PlayerSetColorIndex(gv_p4_DOMINION_PURPLE, 1, true)
// L627
PlayerSetColorIndex(gv_p5_DOMINION_GREY, 1, true)
// L628
PlayerSetColorIndex(gv_p6_DOMINION_ORANGE, 1, true)
// L629
PlayerSetColorIndex(gv_p8_ALLIED_PINK, 3, true)
// L630
PlayerSetColorIndex(gv_p9_ALLIED_GREEN, 3, true)
// L631
PlayerSetColorIndex(gv_p11_ALLIED_CELLBLOCK_A, 3, true)
// L632
PlayerSetColorIndex(gv_p12_ALLIED_CELLBLOCK_B, 3, true)
// L461
PlayerSetColorIndex(auto09E5D80C_var, 3, true)