# Selected Research Item

Grammar — Research item currently selected by player player
FlagsNative | Function

Returns the research item the specified player has selected.

# Arguments

  • int — Player

Returns — int<preset::ResearchItem>

native int ResearchItemGetSelected(int inPlayer);

Category: Story / Research Panel

# Examples

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

    }

    lv_researchID = libCamp_gf_TS_ResearchUIResearchID(ResearchItemGetSelected(1));
    if ((lv_researchID == libCamp_ge_StoryResearchID_ResearchNone)) {
        return true;

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

    }

    ResearchItemPurchase(ResearchItemGetSelected(1));
    libCamp_gf_SetStoryResearchPurchased(lv_researchID);
    libCamp_gf_TS_ResearchUIUpdate();