Author Topic: Cloning Objects?  (Read 870 times)

Is it possible to create an object with all the properties of another?

Just like you can do with dataBlocks:
Code: [Select]
datablock blah(newDataBlock : oldDataBlock){ ...
Thanks in Advance

I think you can, since "datablocks" are just objects which get trasmitted to clients.

I remember seeing a tutorial for physicalzones, which said you could do this:
Code: [Select]
new PhysicalZone(speedUpZone)
{
 position = "0 0 300";
 velocityMod = "20";
};

followed by

Code: [Select]
new PhysicalZone(speedUpZone2 : speedUpZone)
{
 velocityMod = "40";
};

"Now you are twice as fast as in the original zone, but it keeps the position you set earlier."

Although I'm not sure about cloning objects without a name. You could use setName on it first.