I have been adding AIs to multiplayer maps and having one problem. This was that the AI would not discriminate between Axis and Allies. As soon as I did $AIPlayer.enableEnemy = 1 the AI would shoot at everyone.
I have now discovered what causes this. It would appear that every player is considered to be an american sentient no matter what side they are on. Therefore if you specify your AI as german ($AIPlayer german) he will shoot at everyone and if you specify your AI as american ($AIPlayer american) he'll shoot at noone.
However it looks like you can change the side of the player sentients, as far as can I have found so far there is no issue with this. The thread below defines the players sides:
Code: Select all
SetTeams:
while (1)
{
for (local.i = 1; local.i <= $player.size; local.i++)
{
if ($player[local.i])
{
if ($player[local.i].dmteam == axis)
{
$player[local.i] german
}
else if ($player[local.i].dmteam == allies)
{
$player[local.i] american
}
}
}
wait 5
}
End
