Client-Server Ghosting on host server/single player
by Thomas · in Torque 3D Professional · 08/17/2010 (8:07 am) · 0 replies
Just a short question, maybe this is a feature.
I split a game up in a server and a client game, I wrote some scripts and made my own control object.
On Startup I inherited the onAdd function in script on the client, which sends some commands to the server.
For resolving the indices I used the getGhostId function.
On a dedicated server-client structure this works as wanted.
On a single player or client-host server the server function executes my inherited client onAdd as well. For short term I just test with getGhostId. If it fails I see, that I have the server.
//Update: all my getGhostId() calls on the client and server fail. I thougt, that my player would be created twice one on server and one on client. Obviously that not happening
I split a game up in a server and a client game, I wrote some scripts and made my own control object.
On Startup I inherited the onAdd function in script on the client, which sends some commands to the server.
For resolving the indices I used the getGhostId function.
On a dedicated server-client structure this works as wanted.
On a single player or client-host server the server function executes my inherited client onAdd as well. For short term I just test with getGhostId. If it fails I see, that I have the server.
//Update: all my getGhostId() calls on the client and server fail. I thougt, that my player would be created twice one on server and one on client. Obviously that not happening
About the author
A guy from a farm, milking cows and driving tractors... Otherwise I run in burning houses and save some furniture lives...