# Set Talent Tree Hero Level

Grammar — Set Talent Tree Hero Level(player, heroLevel)
FlagsNative | Action

# Arguments

  • int — Player
  • int — Hero Level

Returns — void

native void SetTalentTreeHeroLevel(
	int inPlayer,
	int inLevel,
);

Category: Talent Tree / Basic

# Examples

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

    }
    if ((libCore_gv_sYSTalentsOn == true)) {
        SetTalentTreeHeroLevel(lv_player, lv_level);
        libGame_gf_TalentsUpdateChoicePanelForPlayer(lv_player);
        if ((libCore_gv_tUTTalentsAutobuyOn == true) && (libGame_gv_talents_ActiveChoiceTierForPlayer[lv_player] != 0) && (libGame_gv_talents_TalentChoices[lv_player][libGame_gv_talents_ActiveChoiceTierForPlayer[lv_player]].lv_selection == 0)) {

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

    }

    SetTalentTreeHeroLevel(lp_player, 0);
    libGame_gf_LevelUpHero(libGame_gv_players[lp_player].lv_heroUnit);
    libUIUI_gf_UIObserverUIAddPlayerToObserverUI(lp_player);

mods/heromods/chogall.stormmodbase.stormdata/LibHCHO.galaxy:1776

    libGame_gf_GrantXPToPlayer(UnitGetPropertyFixed(libGame_gv_players[lv_choPlayer].lv_heroUnit, c_unitPropXP, c_unitPropCurrent), lv_gallPlayer, libGame_ge_XPSources_Debug);
    libGame_gf_TalentsSetupTalentChoicesFromHeroDataForPlayer(libGame_gv_players[lv_gallPlayer].lv_heroIndex, lv_gallPlayer);
    SetTalentTreeHeroLevel(lv_gallPlayer, 0);
    libGame_gf_LevelUpHero(libGame_gv_players[lv_gallPlayer].lv_heroUnit);
    libUIUI_gf_UIObserverUIAddPlayerToObserverUI(lv_gallPlayer);

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

    }

    SetTalentTreeHeroLevel(lp_player, 0);
    libGame_gf_LevelUpHero(libGame_gv_players[lp_player].lv_heroUnit);
    libUIUI_gf_UIObserverUIAddPlayerToObserverUI(lp_player);