Game Development Community

Changing ID's

by Robert Stewart · in Torque Game Engine · 02/18/2005 (8:28 am) · 3 replies

How would i go about changing the Server ID of Players, For instance everytime the game starts up, the player has a random ID, Im looking for a way to make the ID Revert back to the first time it generated the ID, or any other way this could be done. Thanks for any help.

#1
02/18/2005 (12:15 pm)
I'm not sure you can manually change the object id, nor is the id random. An object is assigned an id number based on the order that it was created by the server.

I can't think of a situation where you would have to manually set (or manually serach for) a particular object's id number. If you are looking for a way to search for the 1st, 2nd, 3rd player, ect., it would be a better idea to assign each player a special variable when they are spawned in the game.

When you need to look up the 2nd player, for example, loop through all of the objects in ClientGroup and check to see if the value of that variable is 2.
#2
02/19/2005 (4:25 pm)
Or use an "array" to keep track of them...
#3
02/19/2005 (7:40 pm)
Thanks guys, i have a system in place that is working now.