Shapebase::pickup
by Grant McNeil · in Torque Game Engine · 10/25/2005 (8:57 pm) · 1 replies
I have the following script:
-------------------------------------------------
datablock ItemData(WhateverData)
{
shapeFile = "~/data/shapes/Whatever/Whatever.dts";
};
function ItemData::create(%data)
{
%obj = new Item()
{
dataBlock = %data;
static = true;
rotate = true;
};
return %obj;
}
function ShapeBase::pickup(%this,%obj,%amount)
{
echo("Picked Up?");
}
---------------------------------------------------------------------------
I added an echo statement to the ShapeBase::pickup for the starter.fps, and it echo'd when I collided with it, and continued colliding.
I'm assuming ShapeBase::pickup is called when a client collides with a ShapeBase object, but I could be wrong.
Assuming i'm not wrong, when you hit an instance of my "Whatever" datablock, it should echo "Picked Up?"..
but it doesn't.
what am I doing wrong?
-------------------------------------------------
datablock ItemData(WhateverData)
{
shapeFile = "~/data/shapes/Whatever/Whatever.dts";
};
function ItemData::create(%data)
{
%obj = new Item()
{
dataBlock = %data;
static = true;
rotate = true;
};
return %obj;
}
function ShapeBase::pickup(%this,%obj,%amount)
{
echo("Picked Up?");
}
---------------------------------------------------------------------------
I added an echo statement to the ShapeBase::pickup for the starter.fps, and it echo'd when I collided with it, and continued colliding.
I'm assuming ShapeBase::pickup is called when a client collides with a ShapeBase object, but I could be wrong.
Assuming i'm not wrong, when you hit an instance of my "Whatever" datablock, it should echo "Picked Up?"..
but it doesn't.
what am I doing wrong?
Torque 3D Owner Sean H.