# Set Selected Purchase Category
Grammar — Select purchaseCategory for to|Players
Flags —Native
|Action
Selects the specified purchase category for the specified players.
# Arguments
playergroup
— Toint
<preset::PurchaseCategory> — Purchase Category
Returns — void
native void PurchaseSetSelectedPurchaseCategory(
playergroup inPlayerGroup,
int inPurchaseCategoryId,
);
# 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:6832
UISetFrameVisible(PlayerGroupAll(), c_syncFrameTypePurchasePanel, true);
if ((PurchaseGetSelectedPurchaseCategory(1) == c_invalidPurchaseCategoryId)) {
PurchaseSetSelectedPurchaseCategory(PlayerGroupAll(), libCamp_gv_tS_TechCategory_UI[(libCamp_ge_StoryTechCategory_StoryTechCategoryInfantry)]);
}