Game Development Community

How do i get the position of every client?

by Chris Newman · in Torque Game Engine · 05/01/2005 (5:02 pm) · 7 replies

I cant wait till TDN is up!

Im looking for a way to get the position of the client/clients player.
Ive searched the forums but i cant seem to find anything.

#1
05/01/2005 (7:20 pm)
GetPosition()/getTransform()?
#2
05/01/2005 (7:27 pm)
I figured that out after a bit
right now im doing.
// Give the client control of the player
   $player = %player;
   %this.player = %player;
   %this.setControlObject(%player);
to get a global player and then get the pos from it using the GetPosition function.

Right now im looking for a way to get the position of each player connected to the game. Im sorry i should have been clearer about what i was asking.

So far it seems as if i need to do something with %client.player, but how to get each player...?
#3
05/05/2005 (3:09 pm)
Im still looking on how to get every clients player position.
Can anyone give me any insight?
#4
05/05/2005 (3:37 pm)
Sure do a containerRadius search and set the radius to something HUGE like 4068.
That will return ALL objects in the zone, then just filter by class.
#5
05/05/2005 (4:22 pm)
%count = ClientGroup.getCount();
   for(%cl = 0; %cl < %count; %cl++)
   {
      %client = ClientGroup.getObject(%cl);
      %pos = %client.getPosition();
      echo("client " @ %cl @ " has position: " @ %pos);
   }
#6
05/05/2005 (4:23 pm)
Well Ok so Matthew wanted to take the easy way :)
#7
05/05/2005 (4:41 pm)
Haha
Thanks Matt
Just what i was looking for.