Game Development Community

Client variables

by Marcus Nielsen · in Torque Game Engine · 02/16/2007 (2:27 pm) · 4 replies

Im trying to add some information to the client object, but cant find where to do it...
Where is it instanciated? Is this done in script or in C-code..?

For my particular problem Im looking for %client.score, since I want to add some more stuff like kill/death and such.

/many thanks Marcus!

#1
02/16/2007 (5:41 pm)
You can do that in server/scripts/game.cs


// Other client specific setup..
%cl.score = 0;
#2
02/26/2007 (9:04 am)
Forgot to thank you =)
Didnt know you could add vars to objects on the fly, so thanks alot!
#3
02/27/2007 (6:32 am)
No prob :)
#4
02/27/2007 (6:39 am)
@Marcus: look in common/server/serverConnection.cs. At the top there's the onConnect and onConnectRequest function where all those nice client variables are set up the first time when connecting.