# Set Starting Units For Player
Grammar — Create race melee starting units for player player at position
Flags —Native
|Action
Creates the starting units and structures for the specified player and race.
# Arguments
int
— Playerstring
<gamelink::Race> — Racepoint
— Position
Returns — void
native void MeleeInitUnitsForPlayer(
int player,
string race,
point position,
);
# Related
Category: Melee / Player Settings
- Player Melee Option —
bool
— MeleeGetOption - Enable/Disable Melee Option For Player —
void
— MeleeSetOption - Set Starting Resources For Player —
void
— MeleeInitResourcesForPlayer - Set Starting Units For Player —
void
— MeleeInitUnitsForPlayer
# Examples
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:7601
}
MeleeInitUnitsForPlayer(lp_player, libCOOC_gf_CC_CommanderSpawnRace(libCOOC_gf_ActiveCommanderForPlayer(lp_player)), PlayerStartLocation(lp_player));
if ((lv_larvaCount > 0)) {
auto15C64F69_g = UnitGroup(lv_townHallType, lp_player, RegionCircle(PlayerStartLocation(lp_player), 5.0), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
mods/warcoop/warcoopdata.sc2mod — base.sc2data/TriggerLibs/WarCoopData.galaxy:2153
lv_startingPlayer = PlayerGroupNextPlayer(autoD5159E03_g, lv_startingPlayer);
if (lv_startingPlayer < 0) { break; }
MeleeInitUnitsForPlayer(lv_startingPlayer, UserDataGetGameLink("PlayableLegends", libWCdr_gf_GetLegendInstanceForPlayer(lv_startingPlayer), "RaceStartingUnits", 1), PlayerStartLocation(lv_startingPlayer));
}
}