Game Development Community

throwing a object

by Martin Edmaier · in Torque Game Engine · 08/30/2002 (2:07 am) · 1 replies

Hi guys if I throw a weapon and I pick it up I get the error:

fps/server/scripts/player.cs (778): Unable to find object: '1392' attempting to call function 'getDataBlock'

my script look like that:
function Player::dropWeapon(%this)
{

%newWeapon= new Item()
{
dataBlock = Mark23;
};
MissionCleanup.add(%newWeapon);

ShapeBase::throwObject(%this, %newWeapon);
}
echo ("Player::dropWeapon");
}

A other question: How can I delete the weapon which I hold in my hands.

Thankx,

#1
11/07/2002 (9:05 am)
I dont know if you've solved this problem or not, but try:

MissionGroup.add(%newWeapon);

That adds it to the mission group, and you can interact with it again.

I believe MissionCleanup.add(%blah); just tells the game to delete that object number when the mission is done, before it loads the next one.