Game Development Community

CloneWithBehaviors is spamming the console

by Dan Keller · in Torque Game Builder · 07/29/2008 (10:46 am) · 2 replies

Whenever I call the cloneWithBehaviors function, I get this odd console message. The clone works fine, but the error (and 800KB console.log) is very irritating.
==>$clone = pCircle.cloneWithBehaviors();
t2dSceneGraph::addToScene() - Object '4578' is already in a SceneGraph!.

#1
12/16/2008 (2:38 pm)
I have the same problem, I asked one of the TGB dev. and he said that this may be that the name of a cloned object is the same. I tested it - it's not it - maybe TGB is trying to add object to scene twice? Or the name field is not cleared before calling "addToScene" - just taking a guess here... I also tried using "%newObject = %object.clone(true)" - which is spamming the console even more.
#2
12/17/2008 (7:30 am)
In the aStar tutorial example code it describes a new pref you can set, I think it's called $pref::Con::WarnSceneOccupancy or something similar. Check your prefs file for the exact name, and set it to false to turn off that extraneous warning.