Plus it might help to keep everything neat here.
The Code Snipplets (Gist.Github)
Spoiler: VideoThe video demonstrates the problem. The code works flawlessly when it comes to picking up a weapon you aren't carrying (in this case, carrying a Bazooka but wanting to pick up a Textwall) but when picking up a weapon you all ready carry, it just picks up the weapon anyway, not dropping the one you were carrying.
The behavior is supposed to be similar to Rise of the Triad's weapon system (with the addition of +use being a safeguard against accidentally picking up the inventory). In that you could only carry one "heavy weapon" at a time, and picking up another pickup would have you "drop" the one you were carrying.
I've heard A_DropInventory be suggested, but A_DropInventory I don't think would offer the flexibility of this. I dunno if it could work on a generic Weapon pickup. The reason I used CustomInventory was because IMO it was the logical approach to do a heavily scripted item, plus I knew TryPickup could definitely be overridden (while IIRC Inventory's is protected?)
Maybe this is an overly complex way of doing what I want. All I know is the code almost works except for picking up the same weapon you all ready are carrying. See video under spoiler to see exactly what I mean.