Game Development Community

Peculiar Situation

by Chris Byars · in Torque Game Engine · 06/06/2005 (6:04 pm) · 3 replies

I have not tested LAN/Internet games with my project for a while, due to a crash in connection, which as as of late, been resolved.

So, I load up a mission, it has a wheeled vehicle, in which "caryaw" is controlled by the mouse's x-axis, and "brake" is applied using the spacebar. What I've found is that, the server player has full functionality. The server player can look left and right and walk around, jump using the spacebar, get into the vehicle, the vehicle brakes using the spacebar now, and the player steers with the mouose. Hit X to get out, controls resume for the player's out of vehicle orientation.

When the client player connects to the server player's mission, his mouse does not work correctly by moving it left and right to control the left and right view (yaw), nor does his space bar for jump. If he brings down his console he will notice the line "Unknown command: caryaw", when the mouse is attempted to be moved left and right; and the line "Unknown command: brake", when the spacebar is pressed, instead of jumping.

The strange thing is that the server player fully functions, and the vehicle controls of car.cs only apply when the player enters the wheeledVehicle. The client's is not the case.

I have built from the BraveTree: Car Pack, and am thus using a modified car.cs script from that pack, however I have not changed anything bind-wise in that file.

Any idea why the client player would have trouble and not the server player?

#1
06/06/2005 (6:40 pm)
Car.cs is only executed on the server so any binds there will only work on the server (or person hosting the server). You need to move the binds and related functions to client/scripts/default.bind.cs
#2
06/06/2005 (6:55 pm)
Alright, I'll try that tomorrow when I have access to two PCs at once, and test the functionality. Thanks. That makes sense. :P
#3
06/19/2005 (8:13 pm)
Chris,
Did you solve this, and if so what binds did you move to default.bind.cs? I moved the car controls into the default.binds.cs script and I've been able to get the controls to work on the client side in regards to the player control, but whenever the client player attempts to mount a vehicle Torque crashes. I've turned the code every which way but loose (and created a half a dozen "scratch" directories for Torque on two systems), but whatever I do doesn't seem to solve the crash issue.