# Set Selected Hero Talent Tree

Grammar — Set Selected Hero Talent Tree(player, talentTreeIndex)
FlagsNative | Action

# Arguments

  • int — Player
  • int — Talent Tree Index

Returns — void

native void TalentTreeSetSelectedHeroTalentTree(
	int inPlayer,
	int inTalentTreeIndex,
);

Category: Talent Tree / Basic

# Examples

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/AILib.galaxy:1646

    // Automatic Variable Declarations
    // Implementation
    TalentTreeSetSelectedHeroTalentTree(lp_trigPlayer, lp_talentIndex);
    libAIAI_gv_aIHeroes[lp_trigPlayer].lv_allowedToChooseTalentsTime = (TimerGetElapsed(libGame_gv_gameTimer) + libAIAI_gv_aIHeroChooseTalentDelayBetweenPicks);
    libGame_gf_TalentsChooseTalentForPlayer(libGame_gv_talents_ActiveChoiceTierForPlayer[lp_trigPlayer], lp_buttonIndex, lp_trigPlayer);

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/StartingExperienceLib.galaxy:1775

    for ( ; ( (auto4871E4B0_ai >= 0 && lv_itTier <= auto4871E4B0_ae) || (auto4871E4B0_ai < 0 && lv_itTier >= auto4871E4B0_ae) ) ; lv_itTier += auto4871E4B0_ai ) {
        ShowTalentPanel(libCore_gv_playerGroupFromPlayer[libStEx_gv_pLAYER_01_USER], true, lv_itTier);
        TalentTreeSetSelectedHeroTalentTree(libStEx_gv_pLAYER_01_USER, (libStEx_gv_talents_TalentChoices[lv_itTier].lv_selection + lv_numPreviousTalents));
        libGame_gf_TalentsChooseTalentForPlayer(lv_itTier, libStEx_gv_talents_TalentChoices[lv_itTier].lv_selection, libStEx_gv_pLAYER_01_USER);
        if ((libStEx_gv_talents_TalentChoices[lv_itTier].lv_selection <= 0)) {