IP address from Join
by Howard Dortch · in Torque Game Engine · 06/19/2004 (8:44 am) · 9 replies
I realize I can use the -connect argument for launching the game but was wondering if I could put a gui dialog piece in during the "Join" selection so rather than ping for servers the user can set an IP. If this is possible what command would I call to set the address and refresh the server list to see it?
setAutoConnect(IPAddress:Port) ???
setAutoConnect(IPAddress:Port) ???
#2
06/19/2004 (9:33 am)
No problem on new func, just wondered what it would affect doing it from the Join dialog, wonder if thats too late in the load sequence or not
#3
06/19/2004 (10:49 am)
No it's not too late to do it from the join game dialog since a game connection has yet to be established. So you're still able to have the client connect to a game server there if you want to. I assume you simply want to give the player the ability to join games via the server list browser or by a dialog in which they can enter an IP address and attempt to join a game from there correct? :)
#4
06/19/2004 (11:09 am)
Yes nathan thats what I want, going to add a edit box in the join dialog so they can either use a lan or enter an IP thanks.....
#5
08/29/2005 (9:25 am)
I now have an edit box that the user can put in the ip address of the server and it works great with one exception. If the address is wrong the game engine crashes. Anyone know of a way to prevent the crash ?
#7
08/29/2005 (10:20 am)
Engine should not crash with a bad IP address if you are doing:$foo = new GameConnection();
$foo.connect("YOUR IP HERE");
#8
Thanks,
Peter
09/30/2005 (12:36 pm)
@Howard - This thread is my exact question. I'm a new Torque user and would like to add that IP edit box / connection functionality but quite frankly am still trying to get my handle on implementing new gui events and how precisley to call the connection and join functions. If you wouldn't mind sharing your code for doing this I'd really appreciate what I could learn from it...Thanks,
Peter
#9
I don't know if you guys resolved this or not, but I just posted up a resource that provides this functionality.
It hasn't been approved yet, but you can find it here:
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=10453
If you decide to use it please let me know if you have any problems.
Todd
05/13/2006 (10:06 am)
Hi,I don't know if you guys resolved this or not, but I just posted up a resource that provides this functionality.
It hasn't been approved yet, but you can find it here:
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=10453
If you decide to use it please let me know if you have any problems.
Todd
Torque 3D Owner Chris "DiGi" Timberlake
$foo = new GameConnection();
$foo.connect("YOUR IP HERE");