Determining which team to spawn a bot into during initialization
I've searched for something similar in Pogamut3. I've probably overlooked something but I can't seem to find anything that is helpful, at least in the early stages of the bot's life.
I've tried e.g. getWorldView().getAll(Player.class) in varoius phases of initialization only to finally realize it only returns visible players from the bot's perspective...
I'm assuming this also goes for all the sensor modules and wrappers.
I looked into the Observer classes after remembering one of my earlier questions. I tried doing something like:
observer = factory.newAgent(new SocketConnectionAddress("127.0.0.1", 3002));
observer.getWorldView().addEventListener(PlayerListObtained.class, new IWorldEventListener(){...});
observer.getAct().act(new GetPlayers());
to no avail (Listener was supposed to write to both log and stderr). I don't see the game server reporting any connections from the Observer either.
Is there any way to communicate directly with the server and get a complete list of players during initialization? I would prefer the programmatic control of team selection instead of letting UT team balancing do the work.
Cheers,
Simon
(Sorry for the convoluted post)