# Set Purchase Category Name
Grammar — Set the name of purchaseCategory to name
Flags —Native
|Action
Sets the name for the specified purchase category.
# Arguments
int
<preset::PurchaseCategory> — Purchase Categorytext
— Name
Returns — void
native void PurchaseCategorySetNameText(
int inPurchaseCategoryId,
text inText,
);
# Related
Category: Story / Tech Purchase Panel / Purchase Categories
- Create Purchase Category —
int
<preset::PurchaseCategory> — PurchaseCategoryCreate - Last Created Purchase Category —
int
<preset::PurchaseCategory> — PurchaseCategoryLastCreated - Destroy Purchase Category —
void
— PurchaseCategoryDestroy - Destroy All Purchase Categories —
void
— PurchaseCategoryDestroyAll - Set Purchase Category Name —
void
— PurchaseCategorySetNameText - Set Purchase Category Slot —
void
— PurchaseCategorySetSlot - Set Purchase Category Players —
void
— PurchaseCategorySetPlayerGroup - Set Purchase Category State —
void
— PurchaseCategorySetState
# Examples
campaigns/libertystory.sc2campaign — base.sc2data/TriggerLibs/CampaignLib.galaxy:7587
PurchaseCategoryCreate(PlayerGroupAll(), libCamp_gv_tS_TechCategorySlot[lv_index]);
libCamp_gv_tS_TechCategory_UI[lv_index] = PurchaseCategoryLastCreated();
PurchaseCategorySetNameText(PurchaseCategoryLastCreated(), libCamp_gv_tS_TechCategoryName[lv_index]);
}
campaigns/libertystory.sc2campaign — base.sc2data/TriggerLibs/CampaignLib.galaxy:12666
lv_tech = PurchaseGetSelectedPurchaseCategory(1);
PurchaseCategorySetState(PurchaseGetSelectedPurchaseCategory(1), c_purchaseCategoryStateEnabled);
PurchaseCategorySetNameText(libCamp_gv_tS_TechCategory_UI[(lv_tech)], (libCamp_gv_tS_TechCategoryName[(lv_tech)] + StringToText("")));
return true;
}