# Create Mercenary

Grammar — Create a new state mercenary for playerGroup
FlagsNative | Action

Creates a new mercenary for the mercenary panel. Use “Last Created Mercenary” to get the mercenary created by this action.

# Arguments

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

Returns — void

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

Category: Story / Mercenary Panel

# Examples

campaigns/libertystory.sc2campaignbase.sc2data/TriggerLibs/CampaignLib.galaxy:3740

        while (autoA433EE21_i <= libCamp_gv_TSC_MERC_LAST) {
            lv_indexMerc = libCamp_gv_tS_MercID[autoA433EE21_i];
            MercenaryCreate(PlayerGroupAll(), c_mercenaryStateDisabled);
            libCamp_gv_tS_MercUIMercenaries[(lv_indexMerc)] = MercenaryLastCreated();
            MercenarySetTitleText(MercenaryLastCreated(), libCamp_gf_MercName(lv_indexMerc));