Game Development Community

Adding datablock fields in script: server/client

by Orion Elenzil · in Torque Game Engine · 01/02/2006 (3:41 pm) · 2 replies

Okay, one more time for the slow guy in the back (that's me) -

can i add a custom field to a dataBlock on the server via script and have the custom field propogated to clients without me having to modify ShapeBaseData::packData() ?
(just static data, mind. nothing dynamic here)


eg 'clickURL' in the following:
datablock StaticShapeData(someshape)
{
   // ...
   shapefile = "./someshape.dts";
   clickURL  = "http://garagegames.com";
   // ...
};
.. and in the mission file:
new StaticShape()
{
   // ...
   dataBlock = "someshape";
   // ...
};


both the client and the server instances of the resulting StaticShape seem to have 'clickURL' in their datablock, but i'm suspicious that this is an artifact of running both client and server in one instance.

i'll try with two computers tomorrow.

tia,
orion

#1
01/08/2006 (1:36 am)
It is an artifact, and, no, they can't get networked without editing packData. You could add something to serialize all the dynamic fields but it might get a bit dicy.
#2
01/08/2006 (11:28 am)
Thanks ben.