# Set Starting Units For Player

Grammar — Create race melee starting units for player player at position
FlagsNative | Action

Creates the starting units and structures for the specified player and race.

# Arguments

  • int — Player
  • string [ gamelink::Race ] — Race
  • point — Position

Returns — void

native void MeleeInitUnitsForPlayer(
	int player,
	string race,
	point position,
);

Category: Melee / Player Settings

# Examples

# mods/starcoop/starcoop.sc2mod

LibCOMI.galaxy

// L7572
MeleeInitUnitsForPlayer(lp_player, libCOOC_gf_CC_CommanderSpawnRace(libCOOC_gf_ActiveCommanderForPlayer(lp_player)), PlayerStartLocation(lp_player))

# mods/warcoop/warcoopdata.sc2mod

WarCoopData.galaxy

// L2153
MeleeInitUnitsForPlayer(lv_startingPlayer, UserDataGetGameLink("PlayableLegends", libWCdr_gf_GetLegendInstanceForPlayer(lv_startingPlayer), "RaceStartingUnits", 1), PlayerStartLocation(lv_startingPlayer))