%dstobject.getFrame() question (solved)
by rennie moffat · in Torque Game Builder · 12/17/2010 (10:26 pm) · 4 replies
Hi there,
can some explain to me how I can get the frame of a %dstObject on a collision?
I am currently trying this...
But I get the console message, unknown command and unable to find object.
:s
can some explain to me how I can get the frame of a %dstObject on a collision?
I am currently trying this...
function MouseDraggableBehavior::onCollision(%srcObject, %dstObject, %srcRef, %dstRef, %time, %normal, %contacts, %points)
{
if(%dstObject.class $= "thisClass")
{
%dstObjectFrame = %dstObject.getFrame;
%srcObject.this();
}
}But I get the console message, unknown command and unable to find object.
:s
About the author
My thanks to Garage Games and the Garage Games Community combined with owned determination I got one game up, Temple Racer and I am looking to build more interesting, fun games for the mass market of the iOS app store.
#3
12/19/2010 (6:16 pm)
You forgot %this as your first argument of the callback.
#4
Regardless of little errors, like that (not saying that is little) but thanks.
I realized my logic was completely faulty. I was asking to get the frame of %dstObject, when that was irrelevant. I need the frame of the third object. Not to mention dstObject had no frame, it is not a sprite.
Sorry.
But thanks.
12/19/2010 (6:32 pm)
Oh, I should close this up. Regardless of little errors, like that (not saying that is little) but thanks.
I realized my logic was completely faulty. I was asking to get the frame of %dstObject, when that was irrelevant. I need the frame of the third object. Not to mention dstObject had no frame, it is not a sprite.
Sorry.
But thanks.
Torque Owner rennie moffat
Renman3000
:S