Author Topic: Get rid of an item  (Read 1472 times)

What is the code to get rid of an item? I want to make it disappear after I shoot.

Look at the grenade or pill's script.

I did, I couldn't find it.

Look harder. Another good script to examine that's pretty straight-forward is Zor's "Drop Item on Death" script.

I don't want to drop it though, I want to remove it from the inventory.


I think I found it.

{
   %obj.unMountImage(%slot);
}

Is that right? Also, when I put it in the weapon doesn't appear on the list.

I think I found it.

Code: [Select]
yourgunimage::onFire(%this,%obj,%slot)
{
%obj.unMountImage(%slot);
}


I did that, but I can't spawn the weapon now.

I did that, but I can't spawn the weapon now.

Send me your console report

Won't that make you just 'put away' the weapon rather than it disappearing from your inventory?

Buffer overrun detected D:


Never mind, I fixed it. But Space Guy was right, it just unequipped it. I need it to disappear from the inventory.
« Last Edit: August 05, 2008, 02:54:14 AM by the irish q »

They've given you the answer two times.
The freaking pill or grenade script!