# Init Melee AI
Grammar — Initialize the AI for player player
Flags —Native
|Action
Initializes the melee AI for a specific player. Calling Start Melee AI For All Players will call this action for each computer player.
# Arguments
int
— Player
Returns — void
void AIMeleeStart(int player);
# Related
Category: AI Advanced / Utility / Actions
- Start AI —
void
— AIStart - Accept Surrender —
void
— AIGoodGame - Init Melee AI —
void
— AIMeleeStart - Set APM —
void
— AISetAPM - Release Unit —
void
— AIReleaseUnit - Set State —
void
— AISetSpecificState - Set All States —
void
— AISetAllStates - Set Flag —
void
— AISetFlag - Set Coop Flag —
void
— AISetCoopFlag - Set Tech Flag State —
void
— AITechFlag - Set Unit Evaluation Custom Index —
void
— AIEvalSetCustomIndex - Enable/Disable AI Option For Unit —
void
— UnitSetAIOption - Set Defense Radii —
void
— AISetDefenseRadii
# Examples
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:12443
}
if ((PlayerType(2) == c_playerTypeComputer)) {
AIMeleeStart(2);
}