# Set Planet State
Grammar — Change the state of planet to state
Flags —Native
|Action
Sets the visibility state of the specified planet.
# Arguments
int
<planet> — Planetint
<preset::PlanetState> — State
Returns — void
native void PlanetSetState(int inPlanetId, int inState);
# Related
Category: Story / Planet Panel / Planet Properties
- Set Planet Name —
void
— PlanetSetPlanetName - Set Planet State —
void
— PlanetSetState - Set Planet Model —
void
— PlanetSetPlanetModelLink - Set Planet Background Model —
void
— PlanetSetBackgroundModelLink - Set Planet Players —
void
— PlanetSetPlayerGroup - Set Planet Description —
void
— PlanetSetDescriptionText - Set Planet Tooltip —
void
— PlanetSetTooltipText - Set Planet Mission Title —
void
— PlanetSetMissionTitle - Set Planet Mission Name —
void
— PlanetSetMissionName - Set Planet Primary Objective Title —
void
— PlanetSetPrimaryObjectiveTitle - Set Planet Primary Objective Text —
void
— PlanetSetPrimaryObjectiveText - Set Planet Secondary Objective Text —
void
— PlanetSetSecondaryObjectiveText - Set Planet Secondary Objective Title —
void
— PlanetSetSecondaryObjectiveTitle - Set Planet Reward Title —
void
— PlanetSetRewardTitle - Set Planet Reward Text —
void
— PlanetSetRewardText - Set Planet Research Title —
void
— PlanetSetResearchTitle - Set Planet Research Text —
void
— PlanetSetResearchText - Set Planet Bonus Title —
void
— PlanetSetBonusTitle - Set Planet Bonus Text —
void
— PlanetSetBonusText - Set Planet Frame Text —
void
— PlanetSetPlanetText - Set Planet Contact Title —
void
— PlanetSetContactTitle - Set Planet Contact Name —
void
— PlanetSetContactName - Set Planet Contact Model —
void
— PlanetSetContactModelLink - Set Planet Contact Actor —
void
— PlanetSetContactActorLink - Set Planet Contact Tooltip —
void
— PlanetSetContactTooltipText - Set Planet Technology Title —
void
— PlanetSetTechnologyTitle - Set Planet Technology Name —
void
— PlanetSetTechnologyName - Set Planet Technology Text —
void
— PlanetSetTechnologyText - Set Planet Technology Icon —
void
— PlanetSetTechnologyIconFilePath - Set Planet Technology Unit —
void
— PlanetSetTechnologyUnitLink - Set Planet Technology Tooltip —
void
— PlanetSetTechnologyTooltipText
# Examples
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:10307
gv_planetPanel_Planets[gv_planetPanel_PlanetCount].lv_planetID = lp_planetID;
if ((lp_hideButton == true)) {
PlanetSetState(lv_planet, c_planetStateHidden);
}
else {
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:10310
}
else {
PlanetSetState(lv_planet, c_planetStateActive);
}
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:25288
ConversationDataRegisterPortrait(gf_ConvoCharacter(ge_ActorID_ActorHorner), c_invalidPortraitId);
if ((gf_PlanetPanelPlanetFromPlanetID(libCamp_gf_MissionPlanet(libCamp_ge_MapID_MapTHanson01)) != c_invalidPlanetId)) {
PlanetSetState(gf_PlanetPanelPlanetFromPlanetID(libCamp_gf_MissionPlanet(libCamp_ge_MapID_MapTHanson01)), c_planetStateActive);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:25292
if ((gf_PlanetPanelPlanetFromPlanetID(libCamp_gf_MissionPlanet(libCamp_ge_MapID_MapTTychus01)) != c_invalidPlanetId)) {
PlanetSetState(gf_PlanetPanelPlanetFromPlanetID(libCamp_gf_MissionPlanet(libCamp_ge_MapID_MapTTychus01)), c_planetStateActive);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:25332
autoB6215CF2_val = ConversationDataStateGetValue("WritingCustomStates|PlanetPanel_PlanetHighlights");
if (autoB6215CF2_val == 0) {
PlanetSetState(gf_PlanetPanelPlanetFromPlanetID(libCamp_gf_MissionPlanet(libCamp_ge_MapID_MapTHanson01)), c_planetStateActive);
PlanetSetState(gf_PlanetPanelPlanetFromPlanetID(libCamp_gf_MissionPlanet(libCamp_ge_MapID_MapTTychus01)), c_planetStateActive);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:25333
if (autoB6215CF2_val == 0) {
PlanetSetState(gf_PlanetPanelPlanetFromPlanetID(libCamp_gf_MissionPlanet(libCamp_ge_MapID_MapTHanson01)), c_planetStateActive);
PlanetSetState(gf_PlanetPanelPlanetFromPlanetID(libCamp_gf_MissionPlanet(libCamp_ge_MapID_MapTTychus01)), c_planetStateActive);
}
else if (autoB6215CF2_val == 1) {
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:25336
}
else if (autoB6215CF2_val == 1) {
PlanetSetState(gf_PlanetPanelPlanetFromPlanetID(libCamp_gf_MissionPlanet(libCamp_ge_MapID_MapTHanson01)), c_planetStateEmphasized);
PlanetSetState(gf_PlanetPanelPlanetFromPlanetID(libCamp_gf_MissionPlanet(libCamp_ge_MapID_MapTTychus01)), c_planetStateActive);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:25337
else if (autoB6215CF2_val == 1) {
PlanetSetState(gf_PlanetPanelPlanetFromPlanetID(libCamp_gf_MissionPlanet(libCamp_ge_MapID_MapTHanson01)), c_planetStateEmphasized);
PlanetSetState(gf_PlanetPanelPlanetFromPlanetID(libCamp_gf_MissionPlanet(libCamp_ge_MapID_MapTTychus01)), c_planetStateActive);
}
else if (autoB6215CF2_val == 2) {
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:25340
}
else if (autoB6215CF2_val == 2) {
PlanetSetState(gf_PlanetPanelPlanetFromPlanetID(libCamp_gf_MissionPlanet(libCamp_ge_MapID_MapTHanson01)), c_planetStateActive);
PlanetSetState(gf_PlanetPanelPlanetFromPlanetID(libCamp_gf_MissionPlanet(libCamp_ge_MapID_MapTTychus01)), c_planetStateEmphasized);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:25341
else if (autoB6215CF2_val == 2) {
PlanetSetState(gf_PlanetPanelPlanetFromPlanetID(libCamp_gf_MissionPlanet(libCamp_ge_MapID_MapTHanson01)), c_planetStateActive);
PlanetSetState(gf_PlanetPanelPlanetFromPlanetID(libCamp_gf_MissionPlanet(libCamp_ge_MapID_MapTTychus01)), c_planetStateEmphasized);
}
else {
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:10307
gv_planetPanel_Planets[gv_planetPanel_PlanetCount].lv_planetID = lp_planetID;
if ((lp_hideButton == true)) {
PlanetSetState(lv_planet, c_planetStateHidden);
}
else {
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:10310
}
else {
PlanetSetState(lv_planet, c_planetStateActive);
}
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:25288
ConversationDataRegisterPortrait(gf_ConvoCharacter(ge_ActorID_ActorHorner), c_invalidPortraitId);
if ((gf_PlanetPanelPlanetFromPlanetID(libCamp_gf_MissionPlanet(libCamp_ge_MapID_MapTHanson01)) != c_invalidPlanetId)) {
PlanetSetState(gf_PlanetPanelPlanetFromPlanetID(libCamp_gf_MissionPlanet(libCamp_ge_MapID_MapTHanson01)), c_planetStateActive);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:25292
if ((gf_PlanetPanelPlanetFromPlanetID(libCamp_gf_MissionPlanet(libCamp_ge_MapID_MapTTychus01)) != c_invalidPlanetId)) {
PlanetSetState(gf_PlanetPanelPlanetFromPlanetID(libCamp_gf_MissionPlanet(libCamp_ge_MapID_MapTTychus01)), c_planetStateActive);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:25332
autoB6215CF2_val = ConversationDataStateGetValue("WritingCustomStates|PlanetPanel_PlanetHighlights");
if (autoB6215CF2_val == 0) {
PlanetSetState(gf_PlanetPanelPlanetFromPlanetID(libCamp_gf_MissionPlanet(libCamp_ge_MapID_MapTHanson01)), c_planetStateActive);
PlanetSetState(gf_PlanetPanelPlanetFromPlanetID(libCamp_gf_MissionPlanet(libCamp_ge_MapID_MapTTychus01)), c_planetStateActive);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:25333
if (autoB6215CF2_val == 0) {
PlanetSetState(gf_PlanetPanelPlanetFromPlanetID(libCamp_gf_MissionPlanet(libCamp_ge_MapID_MapTHanson01)), c_planetStateActive);
PlanetSetState(gf_PlanetPanelPlanetFromPlanetID(libCamp_gf_MissionPlanet(libCamp_ge_MapID_MapTTychus01)), c_planetStateActive);
}
else if (autoB6215CF2_val == 1) {
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:25336
}
else if (autoB6215CF2_val == 1) {
PlanetSetState(gf_PlanetPanelPlanetFromPlanetID(libCamp_gf_MissionPlanet(libCamp_ge_MapID_MapTHanson01)), c_planetStateEmphasized);
PlanetSetState(gf_PlanetPanelPlanetFromPlanetID(libCamp_gf_MissionPlanet(libCamp_ge_MapID_MapTTychus01)), c_planetStateActive);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:25337
else if (autoB6215CF2_val == 1) {
PlanetSetState(gf_PlanetPanelPlanetFromPlanetID(libCamp_gf_MissionPlanet(libCamp_ge_MapID_MapTHanson01)), c_planetStateEmphasized);
PlanetSetState(gf_PlanetPanelPlanetFromPlanetID(libCamp_gf_MissionPlanet(libCamp_ge_MapID_MapTTychus01)), c_planetStateActive);
}
else if (autoB6215CF2_val == 2) {
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:25340
}
else if (autoB6215CF2_val == 2) {
PlanetSetState(gf_PlanetPanelPlanetFromPlanetID(libCamp_gf_MissionPlanet(libCamp_ge_MapID_MapTHanson01)), c_planetStateActive);
PlanetSetState(gf_PlanetPanelPlanetFromPlanetID(libCamp_gf_MissionPlanet(libCamp_ge_MapID_MapTTychus01)), c_planetStateEmphasized);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:25341
else if (autoB6215CF2_val == 2) {
PlanetSetState(gf_PlanetPanelPlanetFromPlanetID(libCamp_gf_MissionPlanet(libCamp_ge_MapID_MapTHanson01)), c_planetStateActive);
PlanetSetState(gf_PlanetPanelPlanetFromPlanetID(libCamp_gf_MissionPlanet(libCamp_ge_MapID_MapTTychus01)), c_planetStateEmphasized);
}
else {