Game Development Community

SetThirdPerson multiplayer

by Adam Beer · in Torque Game Engine Advanced · 04/24/2008 (9:35 pm) · 1 replies

When you want to toggle between 1st and 3rd person view, it seems to be broken in multiplayer. I get the following error when I am in a dedicated server:

default.binds.cs: unable to find Object 'ServerConnection' attempting to call 'setFirstPerson'

I also used the connect command to connect to the dedicated server "connect("IP.IP.IP.IP:28000");", in case that is the problem. If it doesnt matter how you connect, what else could be the issue?

#1
04/24/2008 (10:28 pm)
Ok I figured it out. In common/clientScripts/missionDownolad.cs I changed the connect function from this:

function connect(%server)
{
   %conn = new GameConnection();
   %conn.connect(%server);
}

to this:

function connect(%server)
{
   %conn = new GameConnection(ServerConnection);
   %conn.setConnectArgs($pref::Player::Name);
   %conn.setJoinPassword($Client::Password);
   %conn.connect(%server);
}


And now it works fine.