# Last Created Research Tier

Grammar — Last created research tier
FlagsNative | Function

Returns the last research tier created using “Create Research Tier”.

Returns — int<preset::ResearchTier>

native int ResearchTierLastCreated();

Category: Story / Research Panel

# Examples

campaigns/libertystory.sc2campaignbase.sc2data/TriggerLibs/CampaignLib.galaxy:5544

        for ( ; ( (autoBD7EADA4_ai >= 0 && lv_tierIndex <= autoBD7EADA4_ae) || (autoBD7EADA4_ai < 0 && lv_tierIndex >= autoBD7EADA4_ae) ) ; lv_tierIndex += autoBD7EADA4_ai ) {
            ResearchTierCreate(PlayerGroupAll(), ResearchCategoryLastCreated(), lv_tierIndex);
            libCamp_gv_tS_ResearchUITiers[lv_categoryIndex][lv_tierIndex] = ResearchTierLastCreated();
            ResearchTierSetMaxPurchasesAllowed(ResearchTierLastCreated(), 1);
            ResearchTierSetRequiredLevel(ResearchTierLastCreated(), (lv_tierIndex * libCamp_gv_tSC_RESEARCH_TIERLEVEL));

campaigns/libertystory.sc2campaignbase.sc2data/TriggerLibs/CampaignLib.galaxy:5545

            ResearchTierCreate(PlayerGroupAll(), ResearchCategoryLastCreated(), lv_tierIndex);
            libCamp_gv_tS_ResearchUITiers[lv_categoryIndex][lv_tierIndex] = ResearchTierLastCreated();
            ResearchTierSetMaxPurchasesAllowed(ResearchTierLastCreated(), 1);
            ResearchTierSetRequiredLevel(ResearchTierLastCreated(), (lv_tierIndex * libCamp_gv_tSC_RESEARCH_TIERLEVEL));
        }

campaigns/libertystory.sc2campaignbase.sc2data/TriggerLibs/CampaignLib.galaxy:5546

            libCamp_gv_tS_ResearchUITiers[lv_categoryIndex][lv_tierIndex] = ResearchTierLastCreated();
            ResearchTierSetMaxPurchasesAllowed(ResearchTierLastCreated(), 1);
            ResearchTierSetRequiredLevel(ResearchTierLastCreated(), (lv_tierIndex * libCamp_gv_tSC_RESEARCH_TIERLEVEL));
        }
    }