Interesting output on t2dParticleEffect clone
by WesTT · in Torque Game Builder · 07/26/2008 (7:18 am) · 4 replies
Hi all.
I am calling cloneWithBehaviors on a particle effect for use in a behavior. The behavior itself has a field that indicates the template particle effect to use, that is to say, the particle effect object has the template behavior attached disabling it on level load.
The field
the cloning code:
the output
t2dSceneContainer::removeSceneObject() - Object 'Always Scope' but not in Scope-List! (7444)
I tried looking this particle warning(?) up in the forums/docco, but I haven't had any luck unfortunately, so does anyone have any ideas why it would spit this out? As for the scope, the t2dParticleEffect object is simply an object in the level file with the template behavior attached. I have other particle effects that get cloned and do not exhibit this behavior (they are also templated).
Thanks.
I am calling cloneWithBehaviors on a particle effect for use in a behavior. The behavior itself has a field that indicates the template particle effect to use, that is to say, the particle effect object has the template behavior attached disabling it on level load.
The field
%template.addBehaviorField(firePrt, "Fire Particle System", object, "None", t2dParticleEffect);
the cloning code:
%this.zombieFlames = %this.firePrt.cloneWithBehaviors();
the output
t2dSceneContainer::removeSceneObject() - Object 'Always Scope' but not in Scope-List! (7444)
I tried looking this particle warning(?) up in the forums/docco, but I haven't had any luck unfortunately, so does anyone have any ideas why it would spit this out? As for the scope, the t2dParticleEffect object is simply an object in the level file with the template behavior attached. I have other particle effects that get cloned and do not exhibit this behavior (they are also templated).
Thanks.
#2
Yeah, I noticed that using clone works but unfortunately some (many) of my particle objects also have behaviors on them, and I don't really wish to write setup functions for each one. I'll probably come back to it at some point but for now my code is working so it's onto other things for me.
08/01/2008 (7:17 am)
Hi Adam. I think I should re-iterate that the code using cloneWithBehaviors appears works just fine and this appears to be a warning. That said I'd certainly like to find out the reasons as to why it does it, as I like to have a clean log file. :PYeah, I noticed that using clone works but unfortunately some (many) of my particle objects also have behaviors on them, and I don't really wish to write setup functions for each one. I'll probably come back to it at some point but for now my code is working so it's onto other things for me.
#3
08/01/2008 (8:19 am)
Haha! Sorry yeah, i'm exactly the same! It appears fine but when you have an effect for a collision, an explosion, and a points effect by level 4 i had a console log of 227Kb! I too like to keep it nice and clean! It's not an error but just a little niggle in the back of my mind ;)
#4
Con::execute - 0 has no namespace: onRemoveFromScene
Of course, everything works just fine, it's just a warning.
08/10/2008 (10:47 pm)
Hmmm... I get a similar thing, but when I clone a t2dStaticSprite. I seeCon::execute - 0 has no namespace: onRemoveFromScene
Of course, everything works just fine, it's just a warning.
Torque Owner Adam Griffiths
I know it's not much help but I just wanted you to know that you're not going mad! Somebody else has had success by using just clone() if you wanted to try that but it didn't work for myself. Still trying to find a solution though so if I find one I shall let you know!