# Create Planet
Grammar — Create a new state planet for playerGroup
Flags —Native
|Action
Creates a new planet on the planet panel for the specified players. Use “Last Created Planet” to refer to the planet that was created.
# Arguments
playergroup
— Player Groupint
<preset::PlanetState> — State
Returns — int
<planet>
native int PlanetCreate(
playergroup inPlayerGroup,
int inState,
);
# Related
Category: Story / Planet Panel / Planets
- Destroy All Planets —
void
— PlanetDestroyAll - Destroy Planet —
void
— PlanetDestroy - Create Planet —
int
<planet> — PlanetCreate - Last Created Planet —
int
<planet> — PlanetLastCreated
# Examples
campaigns/libertystory.sc2campaign — base.sc2data/TriggerLibs/CampaignLib.galaxy:6329
lv_mission = libCamp_gf_PlanetMission(lp_planet);
lv_missionIndex = (lv_mission);
PlanetCreate(PlayerGroupAll(), c_planetStateActive);
PlanetSetPlanetName(PlanetLastCreated(), libCamp_gf_PlanetName(lp_planet));
PlanetSetPlanetModelLink(PlanetLastCreated(), libCamp_gv_tS_PlanetButtonModel[lv_planetIndex]);
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:1700
StoryCreatePlanetPanel();
PlanetCreate(PlayerGroupAll(), c_planetStateHidden);
if ((libVoiC_gf_StoryInSimulation() == true)) {
PlanetPanelSetBackButtonText(PlayerGroupAll(), StringExternal("UI/VoidStoryBack"));