[bf1942] We REALLY need the BF2 Python API

Forrest Thiessen thiessen at alum.mit.edu
Sat Jun 25 19:43:35 EDT 2005

Your script sounds really great--any change you would be willing to
share it?

Does this mean you solved the problem with getting callback registration
to work?  I'm still messing with it--I think I've tried around 64 of the
190  ;-) possible variations I've thought of, and so far none have
worked.  This is slow going, trying to figure everything out in reverse.

On the other hand, I've had very good luck with
host.registerGameStatusHandler(pythonEventHandler). . . it works exactly
like you would expect it to.  You can only get so far with game status
changes, though!

--Forrest (aka "Woody")

Einar S. Idsø wrote:

>Shamelessly following up on my own post here:
>We've just finished a script to perform autokick of players based on
>ping (measure every 30 seconds, if ping goes above limit three times,
>you're out). This was a lot of hard work w/o any documentation on the
>API. Thank goodness for the Wiki-page!
>But to my question: We all know about the game.sayall command by now. It
>will spam some text in green at the top left. We use this to inform
>players when they exceed the ping-limit and when they are about to be
>kicked. We think it would be much better to have text in a red
>warning-color for this, and possibly placed in the middle of the screen
>instead of the top corner. It would also be nice to send the message
>directly to the player instead of spamming it to the entire server.
>So does anyone know of any other rcon- og Py-functions for sending
>messages to the server/individual players? We were able to find a
>function called bf.gameLogic.sendServerMessage() in
>python/bf2/stats/stats.py, but it seems like it's not working right (the
>function in stats.py where it is used seems to be unfinished as well).

More information about the Bf1942 mailing list