Game Development Community

Obj.dump() Tagged vs Member fields

by Erik Madison · in Torque Game Engine · 10/11/2004 (6:16 am) · 2 replies

Can anyone shed some light on the what exactly is a tagged/member field? I thought I understood, but the errors Im getting show otherwise.
A game created object lists most data I need as a member field. After some fancy manipulations on my part, basically recreating the object, all the juicy data I need becomes a tagged field. Tagged fields don't appear to be universally usable, that is all my current functions start puking they can't do this or that because the data doesn't exist. Dumping the item tells me the info _does_ exist, its just now listed as tagged instead.
Hmm, is that perhaps the datablock data that I never added to pack/unpack?

#1
08/07/2007 (2:04 pm)
Greetings!

I've been wondering something similar; here's what I've been able to determine.

'Tagged' fields seem to be another name for dynamic fields, i.e. the fields you add to an object at runtime that aren't part of the object's in-engine definition. We've been playing with datablocks in a client-server setting, and from what I can tell the dynamic fields aren't sent to the clients; they only reside on the server. Perhaps this is the problem you are seeing?

We haven't had the chance to try out pack/unpack yet; that may help.
#2
08/07/2007 (3:58 pm)
Dynamic fields (aka tagged) are script-side only. The C++ side can still get at those variables, but it has to jump over a short hurdle to do so.
Proper member fields are more tightly linked to the C++ side of things.

Just being a member field is not sufficient to ghost the field from server -> client however;
as you speculate, that requires you to explicitely add the field to the pack/unpack process.

.. which for more info on that you should probably post in a private forum, as it will quickly get into C++ source.