Game Development Community

Preventing an object from being ghosted

by Bryce · in Torque 3D Professional · 02/06/2013 (11:47 am) · 3 replies

Hey guys. I apologize if this has been asked before, I've searched endlessly to no avail.

Here's the situation: I've got a few hundred invisible static shapes representing cover points in my mission. AI Players use these to stick to walls and objects to attack from. Well, I really only need these to exist (pardon my terminology) on the server side of things, so the AI can use them. The clients don't need these invisible markers transferred to them; that's a ton of unnecessary packet info.

EDIT: It's worth mentioning that these objects are StaticShape objects, using a datablock.

I don't really understand the network code well enough to know where that transfer-to-client stuff happens. Can someone point that out to me so I can write a console function that shuts ghosting off on certain objects?

Cheers,
-Bryce

#1
02/06/2013 (7:56 pm)
You'll probably need to create a new class that extends from StaticShape (or preferably, something even lighter-weight). In your new class constructor add:

mNetFlags.clear(Ghostable|ScopeAlways);



#2
02/06/2013 (8:02 pm)
I'll give it a shot, thanks Chris! I think I'll derive off of MissionMarker.
#3
02/08/2013 (5:59 pm)
It works! Thanks again.