How to get AgentInfo by player name Posted by BillyLukito on Tue 26 of Feb, 2013 04:13 CET Hi, I've recently wanted to take data from player, so I used the observer to do it but not all the data I want is provided. Can I get AgentInfo from the player by its name? Thanks! Billy
Posted by jakub.gemrot on Wed 27 of Feb, 2013 09:56 CET Hi! Interesting question ... theoretically, all BOT modules should work within the observer as well. But we haven't tested that yet (except AgentStats that was tested and confirmed to work, so if statistics can be gathered why not everything else?). I think that all you have to do is create AgentInfo object (or any other object that interests you) during the construction of the observer. See UT2004BotModuleController.initializeModules() method sourcecode for all available modules. Be sure to correctly initialize the observer, i.e., to receive all important messages that the module needs. E.g. Players requires PLR messages to come regularly, but AgentInfo just needs SLF message. Let us know what you have found! Report any bugs / problems, we will try to fix them ASAP: http://pogamut.cuni.cz/pogamut-mantis Cheers! Jakub
Posted by jakub.gemrot on Wed 27 of Feb, 2013 10:00 CET I might not answered your question directly. 1) BOT cannot obtain more info about our players apart its own messages 2) to truly see what other players see, you have to use OBSERVER connection as you have guessed out 3) check out observer example: svn://jimmy@artemis.ms.mff.cuni.cz/pogamut/trunk/project/Main/PogamutUT2004Examples/16-BotObserver 4) be sure to INIT the observer properly, specifying all "kinds" of messages you want to receive (and be aware that this eats additional resources at GB2004 side) Ask for more details if I'm still missing you. Cheers! Jimmy