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:
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
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
About the author
Associate Kyle Carter