Game Development Community

CloneWithBehaviors Question

by Paul Drust · in Torque Game Builder · 11/01/2008 (10:10 pm) · 1 replies

If you use "cloneWithBehaviors()", does the object created retain the link points of the original object?

I ask because I'm using it and then using "mountToLinkPoint()" and it says the link point doesn't exist.

Anyone have any idea?

#1
01/30/2009 (11:30 am)
Hello,
Yes, it should copy over link points as well.

Maybe the error You have is related to the way how script is interpreting link point IDs. The thing to remember is: link point with ID = 0 in editor means link point ID = 1 when You'll try to reference it in code (eg. by using mountToLinkPoint function).