# Set Purchase Item State

Grammar — Set the state of purchaseItem to state
FlagsNative | Action

Sets the visibility state for the specified purchase item.

# Arguments

Returns — void

native void PurchaseItemSetState(
	int inPurchaseItemId,
	int inState,
);

Category: Story / Tech Purchase Panel / Purchase Items

# Examples

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

        autoB1B8A49C_val = libCamp_gv_tSX_Tech_Status[lv_techIndex];
        if (autoB1B8A49C_val == libCamp_ge_StoryTechStates_TechLocked) {
            PurchaseItemSetState(libCamp_gv_tS_Tech_UI[lv_techIndex], c_purchaseItemStateDisabled);
        }
        else if (autoB1B8A49C_val == libCamp_ge_StoryTechStates_TechUnavailable) {

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

        }
        else if (autoB1B8A49C_val == libCamp_ge_StoryTechStates_TechUnavailable) {
            PurchaseItemSetState(libCamp_gv_tS_Tech_UI[lv_techIndex], c_purchaseItemStateDisabled);
        }
        else if (autoB1B8A49C_val == libCamp_ge_StoryTechStates_TechAvailable) {

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

        }
        else if (autoB1B8A49C_val == libCamp_ge_StoryTechStates_TechAvailable) {
            PurchaseItemSetState(libCamp_gv_tS_Tech_UI[lv_techIndex], c_purchaseItemStateEnabled);
        }
        else if (autoB1B8A49C_val == libCamp_ge_StoryTechStates_TechNew) {

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

        }
        else if (autoB1B8A49C_val == libCamp_ge_StoryTechStates_TechNew) {
            PurchaseItemSetState(libCamp_gv_tS_Tech_UI[lv_techIndex], c_purchaseItemStateEnabled);
        }
        else if (autoB1B8A49C_val == libCamp_ge_StoryTechStates_TechPurchased) {

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

        }
        else if (autoB1B8A49C_val == libCamp_ge_StoryTechStates_TechPurchased) {
            PurchaseItemSetState(libCamp_gv_tS_Tech_UI[lv_techIndex], c_purchaseItemStatePurchased);
        }
        else {