# Set Research Item State
Grammar — Set the state of researchItem|Researchable to state
Flags —Native
|Action
Sets the enabled state of the specified research item.
# Arguments
int
<preset::ResearchItem> — Research Itemint
<preset::PlanetState2> — State
Returns — void
native void ResearchItemSetState(
int inResearchItemId,
int inState,
);
# Related
Category: Story / Research Panel
- Research Panel Close Button Clicked —
void
— TriggerAddEventResearchPanelExit - Create Research Tier —
int
<preset::ResearchTier> — ResearchTierCreate - Last Created Research Tier —
int
<preset::ResearchTier> — ResearchTierLastCreated - Destroy Research Tier —
void
— ResearchTierDestroy - Destroy All Research Tiers —
void
— ResearchTierDestroyAll - Set Research Tier Required Level —
void
— ResearchTierSetRequiredLevel - Set Research Tier Max Purchases Allowed —
void
— ResearchTierSetMaxPurchasesAllowed - Create Research Category —
int
<preset::ResearchCategory> — ResearchCategoryCreate - Last Created Research Category —
int
<preset::ResearchCategory> — ResearchCategoryLastCreated - Destroy Research Category —
void
— ResearchCategoryDestroy - Destroy All Research Categories —
void
— ResearchCategoryDestroyAll - Set Research Category Name —
void
— ResearchCategorySetNameText - Set Research Category Current Level —
void
— ResearchCategorySetCurrentLevel - Set Research Category Last Level —
void
— ResearchCategorySetLastLevel - Create Research Item —
int
<preset::ResearchItem> — ResearchItemCreate - Last Created Research Item —
int
<preset::ResearchItem> — ResearchItemLastCreated - Destroy Research Item —
void
— ResearchItemDestroy - Purchase Research Item —
void
— ResearchItemPurchase - Set Research Item State —
void
— ResearchItemSetState - Set Research Item Icon —
void
— ResearchItemSetIconFilePath - Set Research Item Movie —
void
— ResearchItemSetMovieFilePath - Set Research Item Name —
void
— ResearchItemSetNameText - Set Research Item Description —
void
— ResearchItemSetDescriptionText - Set Research Item Tooltip —
void
— ResearchItemSetTooltipText - Set Research Item Confirmation —
void
— ResearchItemSetConfirmationText - Research Panel Research Button Clicked —
void
— TriggerAddEventResearchPanelPurchase - Research Panel Selection Changed —
void
— TriggerAddEventResearchPanelSelectionChanged - Set Research Item Recently Purchased —
void
— ResearchItemSetRecentlyPurchased - Research Item Is Recently Purchased —
bool
— ResearchItemIsRecentlyPurchased - Set Selected Research Item —
void
— ResearchItemSetSelected - Selected Research Item —
int
<preset::ResearchItem> — ResearchItemGetSelected
# Examples
campaigns/libertystory.sc2campaign — base.sc2data/TriggerLibs/CampaignLib.galaxy:5564
ResearchItemSetTooltipText(ResearchItemLastCreated(), libCamp_gf_StoryResearchTooltip(lv_indexResearch));
ResearchItemSetConfirmationText(ResearchItemLastCreated(), libCamp_gf_StoryResearchConfirmationText(lv_indexResearch));
ResearchItemSetState(ResearchItemLastCreated(), c_researchItemStateEnabled);
auto9C5BB20A_i = auto9C5BB20A_i + 1;
}
campaigns/libertystory.sc2campaign — base.sc2data/TriggerLibs/CampaignLib.galaxy:5592
lv_indexResearch = libCamp_gv_tS_ResearchID[autoCE1E6292_i];
ResearchItemSetTooltipText(libCamp_gv_tS_ResearchUIItem[(lv_indexResearch)], libCamp_gf_StoryResearchTooltip(lv_indexResearch));
ResearchItemSetState(libCamp_gf_TS_StoryResearchUIItem(lv_indexResearch), c_researchItemStateEnabled);
autoCE1E6292_i = autoCE1E6292_i + 1;
}
campaigns/libertystory.sc2campaign — base.sc2data/TriggerLibs/CampaignLib.galaxy:5599
lv_indexResearch = libCamp_gv_tS_ResearchID[autoBAF0C87C_i];
if ((libCamp_gf_StoryResearchStateCheck(lv_indexResearch, libCamp_ge_StoryResearchState_ResearchStatePurchased) == true)) {
ResearchItemSetState(libCamp_gf_TS_StoryResearchUIItem(lv_indexResearch), c_researchItemStatePurchased);
lv_otherResearch = libCamp_gf_TS_StoryResearchTheOtherOfTheSameTier(lv_indexResearch);
ResearchItemSetState(libCamp_gf_TS_StoryResearchUIItem(lv_otherResearch), c_researchItemStateDisabled);
campaigns/libertystory.sc2campaign — base.sc2data/TriggerLibs/CampaignLib.galaxy:5601
ResearchItemSetState(libCamp_gf_TS_StoryResearchUIItem(lv_indexResearch), c_researchItemStatePurchased);
lv_otherResearch = libCamp_gf_TS_StoryResearchTheOtherOfTheSameTier(lv_indexResearch);
ResearchItemSetState(libCamp_gf_TS_StoryResearchUIItem(lv_otherResearch), c_researchItemStateDisabled);
autoD1456021_val = libCamp_gf_StoryResearchCategory(lv_otherResearch);
if (autoD1456021_val == libCamp_ge_StoryResearchCategory_ResearchCategoryProtoss) {