Game Development Community

Copy parameter when making new object

by Phil Shenk · in Torque Game Builder · 07/10/2005 (9:43 pm) · 3 replies

In the Torque script reference, it says about object:
// In TorqueScript
            %var = new ObjectType(Name : CopySource, arg0, ..., argn) 
            {
            ....
But I'm having trouble figuring out how to use the "copySouce" parameter. Maybe it doesn't work with scriptObjects? I'm trying to do this:
$copiedObject = new simSet("name" : $sourceObject);
Doesn't seem to work :(

#1
07/11/2005 (7:33 am)
You have to use 'named' objects for copying to work (IIRC)

See post May 31, 2005 12:02 on this thread

www.garagegames.com/mg/forums/result.thread.php?qt=30610
#2
07/11/2005 (1:15 pm)
Thanks Brian, that's a good thread. Don't know how I missed that one :)
#3
07/11/2005 (6:18 pm)
So many threads, so little time...too much fun to be had coding with T2D
That's how it is with me anyway ;-)