Loading...
 

PogamutUT2004


Self Object Listener

Hi, I am making tournament system and I need to get data about players. However class Player doesn't contain every information I need, so I tried to us class Self. I am trying to use it same way as a Player class, but it doesn't do anything. Also haviing problem with PlayerKilled Listener. When a bot is killed, the listener will not trigger up. Thank for any help.

Sample code (it is just updated ControlConnection):
http://ulozto.cz/xHccVfX/controlserver-java
Really? No help? I am running out of time. Can you please tell me, what am I doing wrong and how to make it work?
There is a difference between Self and Player objects. Self object contains information about the bot your are controlling, player object contains information about OTHER players/bots in the game (for each player/bot there will be one player object created in Pogamut). If you want to get information about OTHER player or bot in the game, you need to refer to Player object that is associated with this player/bot.
PlayerKilled event is called each time when some OTHER player or bot dies in the game. If you want to react to your bot death, use BotKilled event or botKilled method that is part of all our example bots. These events are exported only for bot and observer connections and not for ControlConnection. For gathering the statistics of players and bots there is ObserverConnection (if you are using UT2004). Where did you find out that ControlConnection provides these kind of information? Only thing the control connection provides is positions of all players on the server and player scores.
We have a new archetype with working ObserverConnection example. If you install Pogamut 3.3.0 it should install this archetype to your local maven repository and you can open it from NetBeans. There is also a somewhat outdated tutorial here: ObserverConnection (but it should mostly hold).
Now it would be nice to know what kind of information you need to gather about player/bots.

best,
m
Thanks for the answer. I know about ObserverConnection, but I thought it is used only to get messages, that bot send and receive and I didn't know that you can't get that information in ControlConnection. I will take a look at it. And about information I need. I need info about every player health and shield (Self), about players killed (PlayerKilled) and about items picked (ItemPickedUp). I already have info about team and player scores and about flags. It is working fine in ControlConnection.
 

News

News RSS RSS feed for News link



Pogamut

Quarterly RSS RSS feed for quarterly reports

Acknowledgement

This work is supported by GA UK 1053/2007/A-INF/MFF (2007-8), GA UK 351/2006/A-INF/MFF (2006-8), the Ministry of Education of the Czech Republic (grant MSM0021620838) (2008-9), by the Program "Information Society" under project 1ET100300517 (2006-9), and the project Integration of IT Tools into Education of Humanities (2006-8) and by the project CZ.2.17/3.1.00/31162, which are financed by the European Social Fund, the state budget of the Czech Republic, and by the budget of Municipal House Prague.