# Create Planet

Grammar — Create a new state planet for playerGroup
FlagsNative | 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 Group
  • int<preset::PlanetState> — State

Returns — int<planet>

native int PlanetCreate(
	playergroup inPlayerGroup,
	int inState,
);

Category: Story / Planet Panel / Planets

# Examples

campaigns/libertystory.sc2campaignbase.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.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:1700


    StoryCreatePlanetPanel();
    PlanetCreate(PlayerGroupAll(), c_planetStateHidden);
    if ((libVoiC_gf_StoryInSimulation() == true)) {
        PlanetPanelSetBackButtonText(PlayerGroupAll(), StringExternal("UI/VoidStoryBack"));