# Selected Purchase Item
Grammar — Purchase item selected by Player player
Flags —Native
|Function
Returns the purchase item that the specified player currently has selected.
# Arguments
int
— Player
Returns — int
<preset::PurchaseItem>
native int PurchaseGetSelectedPurchaseItem(int inPlayer);
# Related
Category: Story / Tech Purchase Panel / Interaction
- Purchase Made —
void
— TriggerAddEventPurchaseMade - Purchase Item Selected —
void
— TriggerAddEventSelectedPurchaseItemChanged - Purchase Item Selected —
void
— TriggerAddEventSelectedPurchaseItemChanged - Purchase Category Selected —
void
— TriggerAddEventSelectedPurchaseCategoryChanged - Purchase Category Selected —
void
— TriggerAddEventSelectedPurchaseCategoryChanged - Purchase Exit —
void
— TriggerAddEventPurchaseExit - Set Selected Purchase Category —
void
— PurchaseSetSelectedPurchaseCategory - Set Selected Purchase Item —
void
— PurchaseSetSelectedPurchaseItem - Purchase Purchase Item —
void
— PurchaseItemPurchase - Selected Purchase Category —
int
<preset::PurchaseCategory> — PurchaseGetSelectedPurchaseCategory - Selected Purchase Item —
int
<preset::PurchaseItem> — PurchaseGetSelectedPurchaseItem - Purchased Purchase Item —
int
<preset::PurchaseItem> — EventPurchaseMade - Purchase Item Is Recently Purchased —
bool
— PurchaseItemIsRecentlyPurchased
# Examples
campaigns/libertystory.sc2campaign — base.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.sc2campaign — base.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);