# Set Planet State

Grammar — Change the state of planet to state
FlagsNative | Action

Sets the visibility state of the specified planet.

# Arguments

  • int<planet> — Planet
  • int<preset::PlanetState> — State

Returns — void

native void PlanetSetState(int inPlanetId, int inState);

Category: Story / Planet Panel / Planet Properties

# Examples

campaigns/liberty.sc2campaignbase.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.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:10310

    }
    else {
        PlanetSetState(lv_planet, c_planetStateActive);
    }
}

campaigns/liberty.sc2campaignbase.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.sc2campaignbase.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.sc2campaignbase.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.sc2campaignbase.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.sc2campaignbase.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.sc2campaignbase.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.sc2campaignbase.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.sc2campaignbase.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.sc2mapMapScript.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.sc2mapMapScript.galaxy:10310

    }
    else {
        PlanetSetState(lv_planet, c_planetStateActive);
    }
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.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.sc2mapMapScript.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.sc2mapMapScript.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.sc2mapMapScript.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.sc2mapMapScript.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.sc2mapMapScript.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.sc2mapMapScript.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.sc2mapMapScript.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 {