Getting the ghost player? (solved)
by Dean · in Torque Game Engine · 07/19/2007 (2:32 pm) · 2 replies
I don't know if my terminology is off here, so I'll do my best :p
I noticed that whenever I create a new player, in my game my player's id is 1690 on the server. It also creates a ghost player on my client that's 1706. I know how to access 1690-the server player with LocalClientConnection.player; but I don't know how to get 1706, the ghost object of my player on my client. The same is true with other players and aiplayers etc.
so, in short, what I'd like to know is if there's a way to punch in the server id of one player and get the ghost id of that player on a particular client.... and vice-versa (get the server id from the ghost id).
so I could do something like this maybe?
function yadda(%player)
{
%client = %player.client
%ghostplayer = %client.getGhostId(%player);
}
and the other way around
function yadda2(%ghostplayer)
{
%client = %ghostplayer.client
%player = %client.getId(%ghostplayer);
}
does that make any sense? :p
I noticed that whenever I create a new player, in my game my player's id is 1690 on the server. It also creates a ghost player on my client that's 1706. I know how to access 1690-the server player with LocalClientConnection.player; but I don't know how to get 1706, the ghost object of my player on my client. The same is true with other players and aiplayers etc.
so, in short, what I'd like to know is if there's a way to punch in the server id of one player and get the ghost id of that player on a particular client.... and vice-versa (get the server id from the ghost id).
so I could do something like this maybe?
function yadda(%player)
{
%client = %player.client
%ghostplayer = %client.getGhostId(%player);
}
and the other way around
function yadda2(%ghostplayer)
{
%client = %ghostplayer.client
%player = %client.getId(%ghostplayer);
}
does that make any sense? :p
Associate Jeff Faust
Faust Logic, Inc.
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=4852
It should give you what you need.