# Set Planet Panel Contact Button State

Grammar — Set state as the current button state for playerGroup
FlagsNative | Action

Sets the state of the contact button on the planet panel for the specified players.

# Arguments

  • playergroup — PlayerGroup
  • int<preset::PlanetState3> — State

Returns — void

native void PlanetPanelSetContactButtonState(
	playergroup players,
	int inState,
);

Category: Story / Planet Panel / Planet Panel

# Examples

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:10238

        gf_PlanetPanelAddPlanet(lp_planetID, true);
        PlanetSetSelected(PlayerGroupAll(), PlanetLastCreated());
        PlanetPanelSetContactButtonState(PlayerGroupAll(), c_planetPanelContactButtonStatePlay);
    }
    else {

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:10251

            autoA6E46349_i = autoA6E46349_i + 1;
        }
        PlanetPanelSetContactButtonState(PlayerGroupAll(), c_planetPanelContactButtonStateDisabled);
        if ((gv_planetPanel_CurrentSelection != libCamp_ge_PlanetID_PlanetNone)) {
            lv_planet = gf_PlanetPanelPlanetFromPlanetID(gv_planetPanel_CurrentSelection);

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:10257

                PlanetSetSelected(PlayerGroupAll(), lv_planet);
                if ((gf_PlanetPanelPlanetPitched(lv_planet) == true)) {
                    PlanetPanelSetContactButtonState(PlayerGroupAll(), c_planetPanelContactButtonStatePlay);
                }
                else {

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:10260

                }
                else {
                    PlanetPanelSetContactButtonState(PlayerGroupAll(), c_planetPanelContactButtonStateBlinking);
                }
            }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:10281

    gf_PauseNewItemInfo(false);
    libCamp_gf_HideStoryUI(true, false);
    PlanetPanelSetContactButtonState(PlayerGroupAll(), c_planetPanelContactButtonStateDisabled);
    gf_PlanetPanelDestory();
    gf_StopAllTransmissionConversation();

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:25070

    }
    if ((gf_PlanetPanelPlanetPitched(gf_PlanetPanelPlanetFromPlanetID(gv_planetPanel_CurrentSelection)) == true)) {
        PlanetPanelSetContactButtonState(PlayerGroupAll(), c_planetPanelContactButtonStatePlay);
        return true;
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:25074

    }

    PlanetPanelSetContactButtonState(PlayerGroupAll(), c_planetPanelContactButtonStateBlinking);
    TriggerExecute(gt_PlanetPanelPlay, true, false);
    return true;

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:25174


    if ((PlanetPanelGetContactButtonState(1) == c_planetPanelContactButtonStatePause)) {
        PlanetPanelSetContactButtonState(PlayerGroupAll(), c_planetPanelContactButtonStatePlay);
        gf_StopAllTransmissionConversation();
        return true;

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:25196

    ConversationDataRegisterPortrait(gf_ConvoCharacter(ge_ActorID_ActorValerian), PortraitGetPlanetPanel());
    ConversationDataRegisterPortrait(gf_ConvoCharacter(ge_ActorID_ActorZeratul), PortraitGetPlanetPanel());
    PlanetPanelSetContactButtonState(PlayerGroupAll(), c_planetPanelContactButtonStatePause);
    gf_PlanetPanelGrayoutPortrait(false);
    gv_planetPanel_PlanetPitched[(lv_planetID)] = true;

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:25206


    if ((lv_planetID == gf_PlanetPanelPlanetIDFromPlanet(PlanetGetSelected(1)))) {
        PlanetPanelSetContactButtonState(PlayerGroupAll(), c_planetPanelContactButtonStatePlay);
        gf_PlanetPanelGrayoutPortrait(true);
    }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:10238

        gf_PlanetPanelAddPlanet(lp_planetID, true);
        PlanetSetSelected(PlayerGroupAll(), PlanetLastCreated());
        PlanetPanelSetContactButtonState(PlayerGroupAll(), c_planetPanelContactButtonStatePlay);
    }
    else {

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:10251

            autoA6E46349_i = autoA6E46349_i + 1;
        }
        PlanetPanelSetContactButtonState(PlayerGroupAll(), c_planetPanelContactButtonStateDisabled);
        if ((gv_planetPanel_CurrentSelection != libCamp_ge_PlanetID_PlanetNone)) {
            lv_planet = gf_PlanetPanelPlanetFromPlanetID(gv_planetPanel_CurrentSelection);

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:10257

                PlanetSetSelected(PlayerGroupAll(), lv_planet);
                if ((gf_PlanetPanelPlanetPitched(lv_planet) == true)) {
                    PlanetPanelSetContactButtonState(PlayerGroupAll(), c_planetPanelContactButtonStatePlay);
                }
                else {

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:10260

                }
                else {
                    PlanetPanelSetContactButtonState(PlayerGroupAll(), c_planetPanelContactButtonStateBlinking);
                }
            }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:10281

    gf_PauseNewItemInfo(false);
    libCamp_gf_HideStoryUI(true, false);
    PlanetPanelSetContactButtonState(PlayerGroupAll(), c_planetPanelContactButtonStateDisabled);
    gf_PlanetPanelDestory();
    gf_StopAllTransmissionConversation();

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:25070

    }
    if ((gf_PlanetPanelPlanetPitched(gf_PlanetPanelPlanetFromPlanetID(gv_planetPanel_CurrentSelection)) == true)) {
        PlanetPanelSetContactButtonState(PlayerGroupAll(), c_planetPanelContactButtonStatePlay);
        return true;
    }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:25074

    }

    PlanetPanelSetContactButtonState(PlayerGroupAll(), c_planetPanelContactButtonStateBlinking);
    TriggerExecute(gt_PlanetPanelPlay, true, false);
    return true;

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:25174


    if ((PlanetPanelGetContactButtonState(1) == c_planetPanelContactButtonStatePause)) {
        PlanetPanelSetContactButtonState(PlayerGroupAll(), c_planetPanelContactButtonStatePlay);
        gf_StopAllTransmissionConversation();
        return true;

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:25196

    ConversationDataRegisterPortrait(gf_ConvoCharacter(ge_ActorID_ActorValerian), PortraitGetPlanetPanel());
    ConversationDataRegisterPortrait(gf_ConvoCharacter(ge_ActorID_ActorZeratul), PortraitGetPlanetPanel());
    PlanetPanelSetContactButtonState(PlayerGroupAll(), c_planetPanelContactButtonStatePause);
    gf_PlanetPanelGrayoutPortrait(false);
    gv_planetPanel_PlanetPitched[(lv_planetID)] = true;

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:25206


    if ((lv_planetID == gf_PlanetPanelPlanetIDFromPlanet(PlanetGetSelected(1)))) {
        PlanetPanelSetContactButtonState(PlayerGroupAll(), c_planetPanelContactButtonStatePlay);
        gf_PlanetPanelGrayoutPortrait(true);
    }

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:7214


    libVCUI_gv_pU_MissionPitchPlayed = true;
    PlanetPanelSetContactButtonState(PlayerGroupAll(), c_planetPanelContactButtonStatePause);
    libVCUI_gv_pU_PitchPlaying = true;
    ConversationDataRun(libVoiC_gf_MissionPitch(libVCUI_gv_pU_MissionNextMap), PlayerGroupAll(), c_conversationSkipNone, true);

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:7218

    ConversationDataRun(libVoiC_gf_MissionPitch(libVCUI_gv_pU_MissionNextMap), PlayerGroupAll(), c_conversationSkipNone, true);
    libVCUI_gv_pU_PitchPlaying = false;
    PlanetPanelSetContactButtonState(PlayerGroupAll(), c_planetPanelContactButtonStatePlay);
    return true;
}