Right, sorry I didn't see this thread earlier.
First thing, if you haven't already, I would suggest changing 'BF2Root/python/bf2/init.py':
From:
Code: Select all
def init_module():
# set up stdout and stderr to map to the host's logging function
sys.stdout = fake_stream('stdout')
sys.stderr = fake_stream('stderr')
...
To:
Code: Select all
def init_module():
# set up stdout and stderr to map to the host's logging function
logFile = open('mylogfile.log', 'w')
sys.stdout = logFile
sys.stderr = logFile
...
This will cause the file Bf2Root/mylogfile.log to contain information about the previous run - python syntax errors, and other errors if not caught, will be written here. This is also where 'print' will write to.
A major point to note though, however, is that this will not be up to date during run time - so if you need information that is in there, use the console command 'exit' to close the server.
Neither host.rcon_invoke('game.sayall "message"') or print show in the console, but using host.rcon_invoke('echo "message"') will. (But it will not be outputted elsewhere)
Timers are in seconds.
Player objects are the player's 'souls' - use player.getDefaultVehicle() to get the actual soldier object, which then can be operated on like any other vehicle - .setDamage( dmg ) and .getDamage()
Adding triggers to players, no idea, I have never tried it, so post here if you manage to get it working? PCO stands for player controlled object, no idea on what it means here.
And finally, for towing, AFAIK, we have thought about it before, but it doesn't really work too well, and it would increase server strain immensely.