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.
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.
#2
right now im doing.
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...?
05/01/2005 (7:27 pm)
I figured that out after a bitright 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
Can anyone give me any insight?
05/05/2005 (3:09 pm)
Im still looking on how to get every clients player position.Can anyone give me any insight?
#4
That will return ALL objects in the zone, then just filter by class.
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 :)
Associate Kyle Carter