# 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
- [F] —
bool
— Player Melee Option — ( MeleeGetOption ) - [F] —
void
— Enable/Disable Melee Option For Player — ( MeleeSetOption ) - [F] —
void
— Set Starting Resources For Player — ( MeleeInitResourcesForPlayer ) - [F] —
void
— Set Starting Units For Player — ( MeleeInitUnitsForPlayer )
# Examples
# mods/starcoop/starcoop.sc2mod
// L7598
MeleeInitUnitsForPlayer(lp_player, libCOOC_gf_CC_CommanderSpawnRace(libCOOC_gf_ActiveCommanderForPlayer(lp_player)), PlayerStartLocation(lp_player))
# mods/warcoop/warcoopdata.sc2mod
// L2153
MeleeInitUnitsForPlayer(lv_startingPlayer, UserDataGetGameLink("PlayableLegends", libWCdr_gf_GetLegendInstanceForPlayer(lv_startingPlayer), "RaceStartingUnits", 1), PlayerStartLocation(lv_startingPlayer))