# Set Portrait Team Color

Grammar — Set Portrait Team Color to color
FlagsNative | Action

Set the team color of the specified portrait.

# Arguments

  • int<portrait> — Portrait
  • color — Color

Returns — void

native void PortraitSetTeamColor(int p, color inColor);

Category: Portrait / Advanced

# Examples

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/HeroesLib.galaxy:3585

        if ((lp_unit != null)) {
            if ((PlayerGroupHasPlayer(libGame_gf_PlayersOnTeamHeroes(libGame_gv_teamOrderIndex_C, true), UnitGetOwner(lp_unit)) == true)) {
                PortraitSetTeamColor(lv_portrait, libNtve_gf_ConvertPlayerColorToColor(2));
            }
            else if ((PlayerGroupHasPlayer(libGame_gf_PlayersOnTeamHeroes(libGame_gv_teamChaosIndex_C, true), UnitGetOwner(lp_unit)) == true)) {

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/HeroesLib.galaxy:3588

            }
            else if ((PlayerGroupHasPlayer(libGame_gf_PlayersOnTeamHeroes(libGame_gv_teamChaosIndex_C, true), UnitGetOwner(lp_unit)) == true)) {
                PortraitSetTeamColor(lv_portrait, libNtve_gf_ConvertPlayerColorToColor(1));
            }
            else if (true) {

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/HeroesLib.galaxy:3591

            }
            else if (true) {
                PortraitSetTeamColor(lv_portrait, libNtve_gf_ConvertPlayerColorToColor(2));
            }
        }

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/HeroesLib.galaxy:3595

        }
        else {
            PortraitSetTeamColor(lv_portrait, libNtve_gf_ConvertPlayerColorToColor(2));
        }
    }

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/HeroesLib.galaxy:3785

        if ((lp_unit != null)) {
            if ((PlayerGroupHasPlayer(libGame_gf_PlayersOnTeamHeroes(libGame_gv_teamOrderIndex_C, true), UnitGetOwner(lp_unit)) == true)) {
                PortraitSetTeamColor(lv_portrait, libNtve_gf_ConvertPlayerColorToColor(2));
            }
            else if ((PlayerGroupHasPlayer(libGame_gf_PlayersOnTeamHeroes(libGame_gv_teamChaosIndex_C, true), UnitGetOwner(lp_unit)) == true)) {

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/HeroesLib.galaxy:3788

            }
            else if ((PlayerGroupHasPlayer(libGame_gf_PlayersOnTeamHeroes(libGame_gv_teamChaosIndex_C, true), UnitGetOwner(lp_unit)) == true)) {
                PortraitSetTeamColor(lv_portrait, libNtve_gf_ConvertPlayerColorToColor(1));
            }
            else if (true) {

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/HeroesLib.galaxy:3791

            }
            else if (true) {
                PortraitSetTeamColor(lv_portrait, libNtve_gf_ConvertPlayerColorToColor(0));
            }
        }

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/HeroesLib.galaxy:3795

        }
        else {
            PortraitSetTeamColor(lv_portrait, libNtve_gf_ConvertPlayerColorToColor(PlayerGetColorIndex(0, false)));
        }
    }