# Purchased Purchase Item
Grammar — Purchased purchase item
Flags —Native
|Function
Returns the purchase item that was purchased. Used in response to a “Purchase Made” event.
Returns — int
<preset::PurchaseItem>
native int EventPurchaseMade();
# Supported triggers
- Purchase Made — TriggerAddEventPurchaseMade
# 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:12692
}
lv_tech = libCamp_gf_TechPurchasableTechID(EventPurchaseMade());
if ((lv_tech != libCamp_ge_StoryTech_StoryTechNone) && (libCamp_gf_StoryCredits() >= libCamp_gf_StoryTechCost(lv_tech)) && ((libCamp_gv_tSX_Tech_Status[(lv_tech)] == libCamp_ge_StoryTechStates_TechAvailable) || (libCamp_gv_tSX_Tech_Status[(lv_tech)] == libCamp_ge_StoryTechStates_TechNew))) {
libCamp_gv_tSX_Tech_Status[(lv_tech)] = libCamp_ge_StoryTechStates_TechPurchased;