# Set Player Skin

Grammar — Set Player player’s hero to skin.
FlagsNative | Action

Sets the hero of the specified player.

# Arguments

  • int — Player
  • string<gamelink::Skin> — Skin

Returns — void

native void PlayerSetSkin(int inPlayer, string inSkin);

Category: Player / Player Settings

# Examples

mods/heroesbrawlmods/brawlmapmods/coop/pvebrawlmod.stormmodbase.stormdata/LibPVEB.galaxy:552

    lv_player = libPVEB_gv_pBNPCHeroes[lv_heroIndex].lv_player;
    if ((libPVEB_gv_pBNPCHeroes[lv_heroIndex].lv_skin != null)) {
        PlayerSetSkin(lv_player, libPVEB_gv_pBNPCHeroes[lv_heroIndex].lv_skin);
    }

mods/heroesbrawlmods/brawlmapmods/coop/pvemod.stormmodbase.stormdata/LibPVEM.galaxy:759

    libGame_gv_players[lv_player].lv_suppressKillLogwhenKilled = false;
    if ((libPVEM_gv_pvENPCHeroes[lv_heroIndex].lv_skin != null)) {
        PlayerSetSkin(lv_player, libPVEM_gv_pvENPCHeroes[lv_heroIndex].lv_skin);
    }

mods/heroesbrawlmods/brawlmapmods/lunarfestival.stormmodbase.stormdata/LibLNYF.galaxy:287

    if (auto19C27B59_val == 0) {
        libGame_gv_players[lp_player].lv_heroIndex = libCore_gf_GetIndexFromHero("Chen");
        PlayerSetSkin(lp_player, "ChenLunar");
    }
    else if (auto19C27B59_val == 1) {

mods/heroesbrawlmods/brawlmapmods/lunarfestival.stormmodbase.stormdata/LibLNYF.galaxy:291

    else if (auto19C27B59_val == 1) {
        libGame_gv_players[lp_player].lv_heroIndex = libCore_gf_GetIndexFromHero("LiLi");
        PlayerSetSkin(lp_player, "LiLiLunarLiLi");
    }
    else if (auto19C27B59_val == 2) {

mods/heroesbrawlmods/brawlmapmods/lunarfestival.stormmodbase.stormdata/LibLNYF.galaxy:295

    else if (auto19C27B59_val == 2) {
        libGame_gv_players[lp_player].lv_heroIndex = libCore_gf_GetIndexFromHero("Illidan");
        PlayerSetSkin(lp_player, "IllidanLunar");
    }
    else if (auto19C27B59_val == 3) {

mods/heroesbrawlmods/brawlmapmods/lunarfestival.stormmodbase.stormdata/LibLNYF.galaxy:299

    else if (auto19C27B59_val == 3) {
        libGame_gv_players[lp_player].lv_heroIndex = libCore_gf_GetIndexFromHero("Wizard");
        PlayerSetSkin(lp_player, "WizardSkinLunar");
    }
    else if (auto19C27B59_val == 4) {

mods/heroesbrawlmods/brawlmapmods/lunarfestival.stormmodbase.stormdata/LibLNYF.galaxy:303

    else if (auto19C27B59_val == 4) {
        libGame_gv_players[lp_player].lv_heroIndex = libCore_gf_GetIndexFromHero("Jaina");
        PlayerSetSkin(lp_player, "LunarJaina");
    }
    else if (auto19C27B59_val == 5) {

mods/heroesbrawlmods/brawlmapmods/lunarfestival.stormmodbase.stormdata/LibLNYF.galaxy:307

    else if (auto19C27B59_val == 5) {
        libGame_gv_players[lp_player].lv_heroIndex = libCore_gf_GetIndexFromHero("Samuro");
        PlayerSetSkin(lp_player, "SamuroMonkey");
    }
    else if (auto19C27B59_val == 6) {

mods/heroesbrawlmods/brawlmapmods/lunarfestival.stormmodbase.stormdata/LibLNYF.galaxy:311

    else if (auto19C27B59_val == 6) {
        libGame_gv_players[lp_player].lv_heroIndex = libCore_gf_GetIndexFromHero("Sylvanas");
        PlayerSetSkin(lp_player, "SylvanasLunar");
    }
    else if (auto19C27B59_val == 7) {

mods/heroesbrawlmods/brawlmapmods/lunarfestival.stormmodbase.stormdata/LibLNYF.galaxy:315

    else if (auto19C27B59_val == 7) {
        libGame_gv_players[lp_player].lv_heroIndex = libCore_gf_GetIndexFromHero("Amazon");
        PlayerSetSkin(lp_player, "AmazonLunar");
    }
    else if (auto19C27B59_val == 8) {

mods/heroesbrawlmods/brawlmapmods/lunarfestival.stormmodbase.stormdata/LibLNYF.galaxy:319

    else if (auto19C27B59_val == 8) {
        libGame_gv_players[lp_player].lv_heroIndex = libCore_gf_GetIndexFromHero("Zuljin");
        PlayerSetSkin(lp_player, "ZuljinLunar");
    }
    else if (auto19C27B59_val == 9) {

mods/heroesbrawlmods/brawlmapmods/lunarfestival.stormmodbase.stormdata/LibLNYF.galaxy:323

    else if (auto19C27B59_val == 9) {
        libGame_gv_players[lp_player].lv_heroIndex = libCore_gf_GetIndexFromHero("Kaelthas");
        PlayerSetSkin(lp_player, "KaelthasLunar");
    }
    else {

mods/heroesbrawlmods/heroselectionmods/ingameheroselection.stormmodbase.stormdata/LibIGHS.galaxy:711

    }
    if ((lv_possibleSkinCount > 0)) {
        PlayerSetSkin(lp_player, lv_possibleSkins[RandomInt(1, lv_possibleSkinCount)]);
    }

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameDataHelperLib.galaxy:5169

    lv_multiplier = ((UnitLevel(libGame_gv_players[lv_abathurPlayer].lv_heroUnit) * 150.0) + 0.0);
    lv_lifeofTarget = UnitGetPropertyFixed(lv_target, c_unitPropLifeMax, c_unitPropNormal);
    PlayerSetSkin(lv_abathurPlayer, libGame_gv_players[UnitGetOwner(lv_target)].lv_skinData.lv_skinID);
    if ((UnitGetOwner(lv_target) <= libCore_gv_bALMaxPlayers) && (libGame_gv_players[UnitGetOwner(lv_target)].lv_activeVehicle != null)) {
        libNtve_gf_CreateUnitsWithDefaultFacing(1, lv_typeofCopiedUnit, 0, lv_abathurPlayer, UnitTypePlacementFromPoint(lv_typeofCopiedUnit, lv_abathurPlayer, UnitGetPosition(libGame_gv_players[lv_ownerofTarget].lv_activeVehicle), 35.0), lv_abathur);

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameDataHelperLib.galaxy:5293

        	if (auto6824BDCC_var<0) { break; }
        	if ((UnitGetType(libGame_gv_players[auto6824BDCC_var].lv_heroUnit) == "HeroAbathur")) {
            PlayerSetSkin(auto6824BDCC_var, libGame_gv_players[auto6824BDCC_var].lv_skinData.lv_skinID);
            UnitSelect(lv_ultimateEvolutionUnit, auto6824BDCC_var, false);
            UnitSelect(libGame_gv_players[auto6824BDCC_var].lv_heroUnit, auto6824BDCC_var, true);

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameLib.galaxy:5535

            libCore_gf_DataLoadSkinDataIntoIndex(libCore_gf_DataSkinsGetSkinLinkFromSkinCatalogIndex(libGame_gv_players[lp_choPlayerID].lv_selectedSkin), lp_choPlayerID);
            libCore_gf_DataLoadSkinDataIntoIndex(libCore_gf_DataSkinsGetSkinLinkFromSkinCatalogIndex(libGame_gv_players[lv_gallPlayerID].lv_selectedSkin), lv_gallPlayerID);
            PlayerSetSkin(lv_gallPlayerID, libGame_gv_players[lv_gallPlayerID].lv_skinData.lv_skinID);
            libGame_gf_ChoGallMountandBannerSelection(lp_choPlayerID, lv_gallPlayerID);
            return ;

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameLib.galaxy:5558

                libCore_gf_DataLoadSkinDataIntoIndex(libCore_gf_DataSkinsGetSkinLinkFromSkinCatalogIndex(libGame_gv_players[lp_choPlayerID].lv_selectedSkin), lp_choPlayerID);
                libCore_gf_DataLoadSkinDataIntoIndex(libCore_gf_DataSkinsGetSkinLinkFromSkinCatalogIndex(libGame_gv_players[lv_gallPlayerID].lv_selectedSkin), lv_gallPlayerID);
                PlayerSetSkin(lv_gallPlayerID, libGame_gv_players[lv_gallPlayerID].lv_skinData.lv_skinID);
                libGame_gf_ChoGallMountandBannerSelection(lp_choPlayerID, lv_gallPlayerID);
                return ;

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameLib.galaxy:7847

    libGame_gv_players[lp_choosingPlayer].lv_selectedSkin = libCore_gf_DataSkinsGetSkinIndexFromSkinLink(lv_skinLink);
    libCore_gf_DataLoadSkinDataIntoIndex(lv_skinLink, lv_index);
    PlayerSetSkin(lp_choosingPlayer, libGame_gv_players[lv_index].lv_skinData.lv_skinID);
}

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameLib.galaxy:10587

    lv_skinIndex = lp_player;
    if ((libGame_gv_players[lv_skinIndex].lv_skinData.lv_skinID != null)) {
        PlayerSetSkin(lp_player, libGame_gv_players[lv_skinIndex].lv_skinData.lv_skinID);
    }

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/UILib.galaxy:2934

        	if (auto288FD252_var<0) { break; }
        	if (((PlayerStatus(auto288FD252_var) != c_playerStatusUnused) && (PlayerSkin(auto288FD252_var) != libGame_gv_players[auto288FD252_var].lv_skinData.lv_skinID))) {
            PlayerSetSkin(auto288FD252_var, libGame_gv_players[auto288FD252_var].lv_skinData.lv_skinID);
        }

mods/heromods/dva.stormmodbase.stormdata/LibHDVA.galaxy:190

    lv_skinIndex = lp_player;
    if ((libGame_gv_players[lv_skinIndex].lv_skinData.lv_skinID != null)) {
        PlayerSetSkin(lp_player, libGame_gv_players[lv_skinIndex].lv_skinData.lv_skinID);
    }