Can't work in your ScrimBase.cs
GamePlay.gpRemotePlayers() has no Army() - member.
If you use GamePlay.gpRemotePlayers() you get a player Array.
AiPlayer[] players = GamePlay.gpRemotePlayers();
so you can use foreach and if-clause to look for the players Army
or
you can copy it in a List
List<Player> players = new List<Player>();
if (GamePlay.gpPlayer() != null)
players.Add(GamePlay.gpPlayer()); // to get the host-player in single or normal hosted multiplayer or the server on dedicated server
if (GamePlay.gpRemotePlayers() != null)
players.AddRange(GamePlay.gpRemotePlayers());
then you can use
if (players.Exists(item => item.Army() == Army))
{
}
Last edited by FG28_Kodiak; 01-10-2012 at 08:16 AM.
|