# Selected Planet
Grammar — Currently selected planet by player player
Flags —Native
|Function
Returns the planet the specified player has selected.
# Arguments
int
— Player
Returns — int
<planet>
native int PlanetGetSelected(int player);
# Related
Category: Story / Planet Panel / Planet Panel
- Planet Panel Planet Selected —
void
— TriggerAddEventPlanetMissionSelected - Planet Panel Launched —
void
— TriggerAddEventPlanetMissionLaunched - Planet Panel Canceled —
void
— TriggerAddEventPlanetPanelCanceled - Planet Panel Pressed Replay Button —
void
— TriggerAddEventPlanetPanelReplayPressed - Planet Panel Birth Complete —
void
— TriggerAddEventPlanetPanelBirthComplete - Planet Panel Death Complete —
void
— TriggerAddEventPlanetPanelDeathComplete - Clicked Planet —
int
<planet> — EventPlanetPanelMissionSelected - Selected Planet —
int
<planet> — PlanetGetSelected - Selected Mission Difficulty —
int
<difficulty> — EventPlanetPanelDifficultySelected - Planet Panel Contact Button State —
int
<preset::PlanetState3> — PlanetPanelGetContactButtonState - Set Planet Panel Contact Button State —
void
— PlanetPanelSetContactButtonState - Set Planet Panel Background Image —
void
— PlanetPanelSetBackgroundImage - Enable/Disable Planet Panel Close Button —
void
— PlanetPanelSetBackButtonEnabled - Set Planet Panel Close Button Text —
void
— PlanetPanelSetBackButtonText - Set Planet Panel Close Button Shortcut —
void
— PlanetPanelSetBackButtonShortcut - Set Planet Panel Close Button Tooltip —
void
— PlanetPanelSetBackButtonTooltip - Enable/Disable Planet Panel Dismiss Button —
void
— PlanetPanelSetDismissButtonEnabled - Set Selected Planet —
void
— PlanetSetSelected - Clear Selected Planet —
void
— PlanetClearSelected
# Examples
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:25055
}
if ((PlanetGetSelected(1) == c_invalidPlanetId)) {
return true;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:25060
gf_StopAllTransmissionConversation();
lv_index = gf_PlanetPanelPlanetIndexFromPlanet(PlanetGetSelected(1));
gv_planetPanel_CurrentSelection = gv_planetPanel_Planets[lv_index].lv_planetID;
lv_mission = libCamp_gf_PlanetMission(gv_planetPanel_CurrentSelection);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:25103
}
lv_planetID = gf_PlanetPanelPlanetIDFromPlanet(PlanetGetSelected(1));
if ((lv_planetID == libCamp_ge_PlanetID_PlanetNone)) {
return true;
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:25167
}
lv_index = gf_PlanetPanelPlanetIndexFromPlanet(PlanetGetSelected(1));
lv_planetID = gf_PlanetPanelPlanetIDFromPlanet(PlanetGetSelected(1));
if ((lv_planetID == libCamp_ge_PlanetID_PlanetNone)) {
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:25168
lv_index = gf_PlanetPanelPlanetIndexFromPlanet(PlanetGetSelected(1));
lv_planetID = gf_PlanetPanelPlanetIDFromPlanet(PlanetGetSelected(1));
if ((lv_planetID == libCamp_ge_PlanetID_PlanetNone)) {
return true;
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:25205
}
if ((lv_planetID == gf_PlanetPanelPlanetIDFromPlanet(PlanetGetSelected(1)))) {
PlanetPanelSetContactButtonState(PlayerGroupAll(), c_planetPanelContactButtonStatePlay);
gf_PlanetPanelGrayoutPortrait(true);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:25274
}
lv_index = gf_PlanetPanelPlanetIndexFromPlanet(PlanetGetSelected(1));
lv_planetID = gf_PlanetPanelPlanetIDFromPlanet(PlanetGetSelected(1));
if ((lv_planetID == libCamp_ge_PlanetID_PlanetNone)) {
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:25275
lv_index = gf_PlanetPanelPlanetIndexFromPlanet(PlanetGetSelected(1));
lv_planetID = gf_PlanetPanelPlanetIDFromPlanet(PlanetGetSelected(1));
if ((lv_planetID == libCamp_ge_PlanetID_PlanetNone)) {
if ((gv_planetPanel_FidgetDone == false)) {
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:25303
lv_missionID = libCamp_gf_PlanetMission(lv_planetID);
if (((lv_missionID == libCamp_ge_MapID_MapTRaynor01) || (lv_missionID == libCamp_ge_MapID_MapTRaynor02) || (lv_missionID == libCamp_ge_MapID_MapTRaynor03) || (lv_missionID == libCamp_ge_MapID_MapTZeratul01) || (lv_missionID == libCamp_ge_MapID_MapTZeratul02) || (lv_missionID == libCamp_ge_MapID_MapTZeratul03) || (lv_missionID == libCamp_ge_MapID_MapTZeratul04) || (lv_missionID == libCamp_ge_MapID_MapTValerian02A) || (lv_missionID == libCamp_ge_MapID_MapTValerian02B) || (lv_missionID == libCamp_ge_MapID_MapTValerian03))) {
if ((gf_PlanetPanelPlanetPitched(PlanetGetSelected(1)) == false)) {
TriggerExecute(gt_PlanetPanelPlay, true, false);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:25055
}
if ((PlanetGetSelected(1) == c_invalidPlanetId)) {
return true;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:25060
gf_StopAllTransmissionConversation();
lv_index = gf_PlanetPanelPlanetIndexFromPlanet(PlanetGetSelected(1));
gv_planetPanel_CurrentSelection = gv_planetPanel_Planets[lv_index].lv_planetID;
lv_mission = libCamp_gf_PlanetMission(gv_planetPanel_CurrentSelection);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:25103
}
lv_planetID = gf_PlanetPanelPlanetIDFromPlanet(PlanetGetSelected(1));
if ((lv_planetID == libCamp_ge_PlanetID_PlanetNone)) {
return true;
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:25167
}
lv_index = gf_PlanetPanelPlanetIndexFromPlanet(PlanetGetSelected(1));
lv_planetID = gf_PlanetPanelPlanetIDFromPlanet(PlanetGetSelected(1));
if ((lv_planetID == libCamp_ge_PlanetID_PlanetNone)) {
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:25168
lv_index = gf_PlanetPanelPlanetIndexFromPlanet(PlanetGetSelected(1));
lv_planetID = gf_PlanetPanelPlanetIDFromPlanet(PlanetGetSelected(1));
if ((lv_planetID == libCamp_ge_PlanetID_PlanetNone)) {
return true;
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:25205
}
if ((lv_planetID == gf_PlanetPanelPlanetIDFromPlanet(PlanetGetSelected(1)))) {
PlanetPanelSetContactButtonState(PlayerGroupAll(), c_planetPanelContactButtonStatePlay);
gf_PlanetPanelGrayoutPortrait(true);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:25274
}
lv_index = gf_PlanetPanelPlanetIndexFromPlanet(PlanetGetSelected(1));
lv_planetID = gf_PlanetPanelPlanetIDFromPlanet(PlanetGetSelected(1));
if ((lv_planetID == libCamp_ge_PlanetID_PlanetNone)) {
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:25275
lv_index = gf_PlanetPanelPlanetIndexFromPlanet(PlanetGetSelected(1));
lv_planetID = gf_PlanetPanelPlanetIDFromPlanet(PlanetGetSelected(1));
if ((lv_planetID == libCamp_ge_PlanetID_PlanetNone)) {
if ((gv_planetPanel_FidgetDone == false)) {
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:25303
lv_missionID = libCamp_gf_PlanetMission(lv_planetID);
if (((lv_missionID == libCamp_ge_MapID_MapTRaynor01) || (lv_missionID == libCamp_ge_MapID_MapTRaynor02) || (lv_missionID == libCamp_ge_MapID_MapTRaynor03) || (lv_missionID == libCamp_ge_MapID_MapTZeratul01) || (lv_missionID == libCamp_ge_MapID_MapTZeratul02) || (lv_missionID == libCamp_ge_MapID_MapTZeratul03) || (lv_missionID == libCamp_ge_MapID_MapTZeratul04) || (lv_missionID == libCamp_ge_MapID_MapTValerian02A) || (lv_missionID == libCamp_ge_MapID_MapTValerian02B) || (lv_missionID == libCamp_ge_MapID_MapTValerian03))) {
if ((gf_PlanetPanelPlanetPitched(PlanetGetSelected(1)) == false)) {
TriggerExecute(gt_PlanetPanelPlay, true, false);
}