Hey, I'm working on a script to place items on the map and have them disappear when you walk over them, and it works, but it spams the console.
any idea how to fix this?
code:
function Armor::onCollision(%this, %obj, %col, %thing, %other, %other2)
{
if(%col.getDatablock().getName() $= "MyItem" && isObject(%obj.client))
{
if(isObject(%col))
{
if(%obj.client.minigame)
%col.minigame = %obj.client.minigame;
messageClient(%obj.client, '', "\c6The mysterious object dissappered as soon as you got close!");
%col.canPickup = false;
%col.delete();
}
else
{
%col.delete();
MissionCleanup.remove(%col);
}
}
parent::onCollision(%this, %obj, %col, %thing, %other, %other2);
}