Chat
by rmullen · in Torque Game Builder · 04/16/2006 (11:49 pm) · 12 replies
We're having some trouble trying to get the chat system in the common folder executing on our network. How can we get it running?
About the author
#2
04/17/2006 (11:10 am)
You know, the trouble we are having right now is what code to use to execute the chat system. We've tried similar coding to that used to incorperate the server/client network system found in the checkers tutorial, but with no success. Please advise.
#3
04/17/2006 (5:38 pm)
The two main files are chatServer.cs in common/gameScripts/server and chatClient.cs in common/gameScripts/client
#4
go to your common/gameScripts/server/clientConnectin.cs
search for "addTaggedString"...
you should find
then go to common/gameScripts/server/chatServer.cs
replace all instances of
"nameBase"
with just
"name"...
next go to common/gameScripts/server/server.cs
find "%conn = new GameConnection(ServerConnection);"
and add this line after it
now go to common/gameScripts/server/client.cs
find the same line (%conn = new GameConnection(ServerConnection);)
and add the same thing after it
now to open the start server dialog (this si if your starting the server yourself - not connecting to an existing one)...
type this in the console
Make sure the info is right then click create server...
now you must load the chat on the server first, to do this type in "LoadChat();" in the console...
to connect with clients have them run this command in the console
and you can either connect to an IP or Query LAN.
if the server has loaded the chat already then have them type "loadChat();" in the console to connect... chat away.
04/18/2006 (8:57 am)
Ok here are a couple fixes in the chat system in TGB....go to your common/gameScripts/server/clientConnectin.cs
search for "addTaggedString"...
you should find
// Set the name. %client.name = addTaggedString(%nameTest);change it to
// Set the name. %client.name = %nameTest;
then go to common/gameScripts/server/chatServer.cs
replace all instances of
"nameBase"
with just
"name"...
next go to common/gameScripts/server/server.cs
find "%conn = new GameConnection(ServerConnection);"
and add this line after it
%conn.setConnectArgs($pref::Player::name);
now go to common/gameScripts/server/client.cs
find the same line (%conn = new GameConnection(ServerConnection);)
and add the same thing after it
%conn.setConnectArgs($pref::Player::name);
now to open the start server dialog (this si if your starting the server yourself - not connecting to an existing one)...
type this in the console
canvas.pushDialog(startServerGui);
Make sure the info is right then click create server...
now you must load the chat on the server first, to do this type in "LoadChat();" in the console...
to connect with clients have them run this command in the console
canvas.pushDialog(joinServerGui);
and you can either connect to an IP or Query LAN.
if the server has loaded the chat already then have them type "loadChat();" in the console to connect... chat away.
#5
That will really help!
04/18/2006 (10:16 am)
Thanks! That will help me a lot, even if it is for learning purposes. I'm trying to set up a system where the server can send commands to the clients by parsing a chat string rather than using CommandToClient() exclusively.That will really help!
#6
04/21/2006 (9:26 am)
I'm glad :) If you have any further questions or need any further assistance feel free to ask. Have you gone through the Checkers Tutorial yet ?
#7
04/22/2006 (4:51 pm)
It took some time, but I think I've got it reasonably understood. I still can't get a good handle on how and what the :: does sometimes (Simgroups and Simsets?). I'm getting it a little at a time.
#8
like if you had an object or class called "Player"
or you can use it to name global variables... like
$Value::test = "blah";
04/23/2006 (12:25 am)
"::" is how you attach a function to an object...like if you had an object or class called "Player"
function Player::testFunction(%this)
{
}or you can use it to name global variables... like
$Value::test = "blah";
#9
05/30/2006 (8:22 pm)
I just bought TGB today and there is no checkers tutorial...
#10
05/30/2006 (9:27 pm)
Midhir I think Matthew said he is rewriting/editing it for the next release, which will hopefully be here shortly.
#11
05/31/2006 (8:13 am)
I finished some last touch ups yesterday on it :) I rewrote a lot of the first sections to make it work with the Level Builder, well made it integrate with the LB, wanted to make it more than just work with it. Still running into a couple issues, but if all goes well you'll see at least a version of it in the next release :) Btw, I thought the LB wouldn't help much with it, but was wrong, really helps set up the game a lot easier.
#12
Whats the best way to find all the code fixes that have been recommended since the last release of TGE.
I remember that this would have been a daunting task when I was using TGE, but since TGB is just getting going, there should be less changes to make.
Is there public access to a garage games' bug tracker yet. I know I read some hints that someone was considering working on that.
10/30/2006 (2:37 pm)
Wow, I better add this into my code, because I know it will be useful once i get going.Whats the best way to find all the code fixes that have been recommended since the last release of TGE.
I remember that this would have been a daunting task when I was using TGE, but since TGB is just getting going, there should be less changes to make.
Is there public access to a garage games' bug tracker yet. I know I read some hints that someone was considering working on that.
Torque 3D Owner Marc Dreamora Schaerer
Gayasoft