# AIHasHumanAlly
Flags —
Native
# Arguments
int
— player
Returns — bool
native bool AIHasHumanAlly(int player);
# Related
Category: Unclassified
# Examples
mods/core.sc2mod — base.sc2data/TriggerLibs/BaseAI.galaxy:204
// let cheating AIs defend against further threats
AIEarlyDefenseProps(player, 35, 35, 45);
if (!AIHasHumanAlly(player)) {
AISetNumScouts(player, 0);
}
mods/core.sc2mod — base.sc2data/TriggerLibs/MeleeHighAI.galaxy:185
return true;
}
if (AIGetTime() > 120 && AIHasHumanAlly(player)) {
return true;
}
mods/core.sc2mod — base.sc2data/TriggerLibs/MeleeLowAI.galaxy:151
AISetFlag(player, e_flagsScouting, true);
}
else if (AIGetTime() > 40 && AIHasHumanAlly(player)) {
AISetFlag(player, e_flagsScouting, true);
}
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/BaseAI.galaxy:239
// let cheating AIs defend against further threats
AIEarlyDefenseProps(player, 35, 35, 45);
if (!AIHasHumanAlly(player)) {
AISetNumScouts(player, 0);
}
mods/void.sc2mod — base.sc2data/TriggerLibs/MeleeHighAI.galaxy:185
return true;
}
if (AIGetTime() > 120 && AIHasHumanAlly(player)) {
return true;
}