Author Topic: Making an item pickup able no matter what  (Read 976 times)

How would I make a new item pick up able no matter what?
Im in a minigame and It wont pick up, so how should I make it pickupable?
Code: [Select]
new item(){
datablock = nametoid(sworditem);
};
« Last Edit: January 03, 2008, 10:28:02 PM by rkynick »

use swordItem::onCollision() to send the call for item pickup if the player doesn't have that item.

Isn't there also swordItem::onPickup or does that only call if you don't have the item?

Code: [Select]
new item(){
datablock = nametoid(sworditem);
canPickup = 1;
};

Pickle that's completely different.

You'd need this: (It will pick up no matter what the circumstances)
Code: [Select]
function SwordItem::onCollision(%this,%obj,%col)
{
   if(!%col.client)
      return;

   for(%i=0;%i<%col.dataBlock.maxTools;%i++)
   {
      %tool = %col.tool[%i];
      if(%tool $= "" || %tool $= 0)
      {
         %col.tool[%i] = %this;
         messageClient(%col.client,'MsgItemPickup','',%i,%this);
         %obj.delete();
         return;
      }
   }
}


I came up with another solution, but thanks anyways.