# Create Purchase Category

Grammar — Create a new purchase category for Players in slot slot
FlagsNative | Action

Creates a group for purchasable techs for the specified player group. Use “Last Created Purchase Category” to get the purchase category created by this action. Tech purchase actions are used to populate the Hyperion Armory tech purchase UI with data.

# Arguments

  • playergroup — Players
  • int — Slot

Returns — int<preset::PurchaseCategory>

native int PurchaseCategoryCreate(
	playergroup inPlayerGroup,
	int inSlot,
);

Category: Story / Tech Purchase Panel / Purchase Categories

# Examples

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

    for ( ; ( (autoCC1C88BE_ai >= 0 && lv_index <= autoCC1C88BE_ae) || (autoCC1C88BE_ai < 0 && lv_index >= autoCC1C88BE_ae) ) ; lv_index += autoCC1C88BE_ai ) {
        if ((libCamp_gv_tS_TechCategoryID[lv_index] != libCamp_ge_StoryTechCategory_StoryTechCategoryNone) && (libCamp_gv_tS_TechCategory_UI[lv_index] == c_invalidPurchaseCategoryId)) {
            PurchaseCategoryCreate(PlayerGroupAll(), libCamp_gv_tS_TechCategorySlot[lv_index]);
            libCamp_gv_tS_TechCategory_UI[lv_index] = PurchaseCategoryLastCreated();
            PurchaseCategorySetNameText(PurchaseCategoryLastCreated(), libCamp_gv_tS_TechCategoryName[lv_index]);