Game Development Community

Ghosting player model to one client only

by Andy Hubbard · in Torque Game Engine Advanced · 11/28/2008 (12:06 pm) · 5 replies

Hi all,

How would I go about making it so that a dedicated server ghosted the player model to just the dedicated client that connected?

I have a character creation server that has a mission; on client connection the mission is loaded and a base player model is displayed ready for modifying. The only thing is that if another client connects another player model appears on both clients.

Thanks to anyone who can point me in the right direction ;)

Cheers,

Andy

#1
11/28/2008 (3:30 pm)
You could try using a local server instead of the global one...
#2
11/29/2008 (3:37 am)
Hi Dan,

Yes, I have tried this approach but it is not really the way I want to go. For development when running multiple dedicated servers on localhost, and then having a server:client running as well caused problems with connectLocal ;) The problems would likely go away when not running everything on the same machine, but that is not convenient for me to maintain a 'quick' development workflow.

Maybe the above is not a sensible reason for attempting to prevent ghosting to other clients though ..... any other ideas appreciated!

Cheers,

Andy
#3
11/29/2008 (5:27 am)
There are methods in ShapeBase that allows you to scope an object just to a specific client.
#4
12/05/2008 (6:04 am)
Hi Stefan,

I am going blind looking for something in ShapeBase that can help me. Can you possibly point me towards something more specific? Much appreciated!

Cheers,

Andy
#5
12/05/2008 (6:21 am)
Gah. Looks like I spoke too early about there being methods ready for this, sorry!

However, check out NetObject.cpp @ 134. I *think* Torque has the capability to force unscoping of objects, so it shouldn't be too difficult to make another set of functions for removing an object from the clients scope, instead of forcing GhostAlways.