# Selected Purchase Item

Grammar — Purchase item selected by Player player
FlagsNative | Function

Returns the purchase item that the specified player currently has selected.

# Arguments

  • int — Player

Returns — int<preset::PurchaseItem>

native int PurchaseGetSelectedPurchaseItem(int inPlayer);

Category: Story / Tech Purchase Panel / Interaction

# Examples

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

    }

    if ((libCamp_gf_TechPurchasableTechID(PurchaseGetSelectedPurchaseItem(1)) != libCamp_ge_StoryTech_StoryTechNone)) {
        lv_tech = libCamp_gf_TechPurchasableTechID(PurchaseGetSelectedPurchaseItem(1));
        lv_groupID = (libCamp_gv_tS_Tech_GroupID[(lv_tech)]);

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


    if ((libCamp_gf_TechPurchasableTechID(PurchaseGetSelectedPurchaseItem(1)) != libCamp_ge_StoryTech_StoryTechNone)) {
        lv_tech = libCamp_gf_TechPurchasableTechID(PurchaseGetSelectedPurchaseItem(1));
        lv_groupID = (libCamp_gv_tS_Tech_GroupID[(lv_tech)]);
        PurchaseGroupSetState(libCamp_gv_tS_TechGroup_UI[lv_groupID], c_purchaseGroupStateEnabled);