Game Development Community

Two clientConnection.cs questions

by Daniel Allessi · in Torque Game Engine · 02/18/2005 (10:04 pm) · 6 replies

I'm currently going through the common scripts line by line and I've come across two things I could use clarification on. They're probably pretty easy but here goes (and thanks in advance for any help):

1) I see that the actual message parameter is left as "" - so what is the purpose of making this messageClient call? If it's to tag the strings ahead of time, then why is the message parameter itself left blank? I notice a similiar call that sends the connection error but I don't understand that either. What am I missing?

// These should be "silent" versions of these messages...
         messageClient(%client, 'MsgClientJoin', "", 
               %other.name,
               %other,
               %other.sendGuid,
               %other.score, 
               %other.isAIControlled(),
               %other.isAdmin, 
               %other.isSuperAdmin);


2) These two lines are an error, correct?
$instantGroup = ServerGroup;
$instantGroup = MissionCleanup;
The second assignment nullifies the first. I know what $instantGroup is for, but which group should it be assigned to ...?

#1
02/18/2005 (10:23 pm)
1). This send to all the joining client the information for all of the currently connected clients.


2) $instantGroup doesn't appear to be used at all in the scripts.. might be used in the C++ code for something.
#2
02/18/2005 (11:05 pm)
It is used in the C++ code; it is the group to which objects will be added to by default.
#3
02/19/2005 (9:09 am)
I know $instantGroup is used in the c++ code for that purpose, I was moreso curious which group I should leave it assigned to and which line in the script I should remove. I think I'll leave serverGroup as the default since this is the server scripts and I add most anything that needs to be to the missionCleanup.

If it's sending info about all the clients, how come no actual message parameter is used? That's what I don't get.
#4
02/19/2005 (10:11 am)
Also, what is %client.sendGuid for? Is it a bool or something else? I searched the scripts and the c++ code for it and all I ever find is assignments to zero.
#5
02/19/2005 (4:55 pm)
You can just set it to zero. If there isn't a group then they'll be added to the root.

The GUID stuff is a holdover from tribes2.
#6
02/19/2005 (5:02 pm)
Thanks Ben.