Forum: PogamutUT2004

observed player: how to retrieve number of visible players

Hi, which is the best way to retrieve the number of visible players for an OBSERVED player? (http://pogamut.cuni.cz/pogamut_files/latest/doc/tutorials/ch11s03.html)


Any ideas?

Thanks!!
One way would be to store the agents in two maps of . One map containing all agents and the other all visible agents. When an agent becomes visible, you add it to the visible list, when it becomes invisible, you remove it. Have a look in the code for the Players module to see how it is done there.

But if you want to do it properly, you could have a look at the Players module and see if you can change it to work with UT2004Observed bots. It should not be too difficult, all components needed are there as far as I can see.