# Set Selected Planet

Grammar — Set planet as the currently selected planet for playerGroup
FlagsNative | Action

Selects the specified planet on the planet panel for the specified players.

# Arguments

  • playergroup — PlayerGroup
  • int<planet> — Planet

Returns — void

native void PlanetSetSelected(
	playergroup inPlayerGroup,
	int inPlanetId,
);

Category: Story / Planet Panel / Planet Panel

# Examples

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

    if ((lp_planetID != libCamp_ge_PlanetID_PlanetNone)) {
        gf_PlanetPanelAddPlanet(lp_planetID, true);
        PlanetSetSelected(PlayerGroupAll(), PlanetLastCreated());
        PlanetPanelSetContactButtonState(PlayerGroupAll(), c_planetPanelContactButtonStatePlay);
    }

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

            lv_planet = gf_PlanetPanelPlanetFromPlanetID(gv_planetPanel_CurrentSelection);
            if ((lv_planet != c_invalidPlanetId)) {
                PlanetSetSelected(PlayerGroupAll(), lv_planet);
                if ((gf_PlanetPanelPlanetPitched(lv_planet) == true)) {
                    PlanetPanelSetContactButtonState(PlayerGroupAll(), c_planetPanelContactButtonStatePlay);

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

    if ((lp_planetID != libCamp_ge_PlanetID_PlanetNone)) {
        gf_PlanetPanelAddPlanet(lp_planetID, true);
        PlanetSetSelected(PlayerGroupAll(), PlanetLastCreated());
        PlanetPanelSetContactButtonState(PlayerGroupAll(), c_planetPanelContactButtonStatePlay);
    }

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

            lv_planet = gf_PlanetPanelPlanetFromPlanetID(gv_planetPanel_CurrentSelection);
            if ((lv_planet != c_invalidPlanetId)) {
                PlanetSetSelected(PlayerGroupAll(), lv_planet);
                if ((gf_PlanetPanelPlanetPitched(lv_planet) == true)) {
                    PlanetPanelSetContactButtonState(PlayerGroupAll(), c_planetPanelContactButtonStatePlay);

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

    PlanetSetTechnologyTitle(PlanetLastCreated(), StringExternal("Param/Value/lib_VCUI_899CD639"));
    PlanetSetTechnologyTooltipText(PlanetLastCreated(), StringToText(""));
    PlanetSetSelected(PlayerGroupAll(), PlanetLastCreated());
    ConversationDataRegisterPortrait(libVoiC_gf_PC_ClickableConversationLink("Artanis"), PortraitGetPlanetPanel());
    PlanetPanelSetBackgroundImage(PlayerGroupAll(), "Assets\\Textures\\ui_planetpanel_frame_backdrop_space.dds");