Game Development Community

Getting player ID's at the server console

by Tim Hutcheson · in Torque Game Engine · 10/06/2005 (5:30 pm) · 0 replies

I'm trying to figure out how to reliably determine the control object ID for each client connection as it is made in GameConnection::onConnect().

It seems like adding this,

%clientId = %client.getId();
%obj = %clientId.getControlObject();

in onConnect would set %obj to the ID of the clients player. In fact doing that in the console window using the %client value works. But not in the script when running in multiplayer mode. Is there some low level security issue that prevents scripts from access ing the clients player ID or something. Again, I can enter the server console and do it.
Just can't seem to get the same thing in a script running on the server.