# Create Purchase Item

Grammar — Create a new purchase item for Players in slot slot under __purchaseGroup|Purchase Group __
FlagsNative | Action

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

# Arguments

  • playergroup — Players
  • int [ preset::PurchaseGroup ] — Purchase Group
  • int — Slot

Returns — int [ preset::PurchaseItem ]

native int PurchaseItemCreate(
	playergroup inPlayerGroup,
	int inPurchaseGroupId,
	int inSlot,
);

Category: Story / Tech Purchase Panel / Purchase Items

# Examples

# campaigns/libertystory.sc2campaign

CampaignLib.galaxy

// L7637
PurchaseItemCreate(PlayerGroupAll(), libCamp_gv_tS_TechGroup_UI[(libCamp_gv_tS_Tech_GroupID[lv_techIndex])], libCamp_gf_StoryTechSlot(lv_indexTech))