Page MenuHomeFeedback Tracker

Script command removeItem fails to remove items added from reammo boxes if the item is descendant from ItemRadio
Closed, ResolvedPublic

Description

When adding items that descend from the item class ItemRadio from a ammo box the command removeItem fails to remove the item. The command removeAllItems does work.

Details

Legacy ID
488574005
Severity
Major
Resolution
No Bug
Reproducibility
Always
Category
Inventory
Steps To Reproduce
  1. Create a addon with a weapon item descendant from ItemRadio.
  2. Add that item to a ammo box.
  3. Enter game and pick up item from ammo box.
  4. Execute a removeItem command on that item class on your player.
  5. Check gear if still there.
Additional Information

This appeared when porting ACRE for A2 to A3.

ACRE uses a "base" item class that descends from ItemRadio (as so people start out with a radio by default since its included on all players) that ACRE then replaces with a uniquely ID'd weapon class name. It checks to see if a base class exists in your inventory, and then it gets a unique ID class, adds that and removes the base class. If ACRE can not remove the base class it can not tell if that is an additional new non-ID radio or if its the original and it fails to work properly.

Event Timeline

Nou edited Steps To Reproduce. (Show Details)Mar 13 2013, 12:43 AM
Nou edited Additional Information. (Show Details)
Nou set Category to Inventory.
Nou set Reproducibility to Always.
Nou set Severity to Major.
Nou set Resolution to No Bug.
Nou set Legacy ID to 488574005.May 7 2016, 12:27 PM
Nou added a subscriber: Nou.May 7 2016, 12:27 PM
Nou added a comment.Mar 14 2013, 7:54 AM

Woops, this issue was on my end. Crates were adding Items to TransportWeapons still... not TransportItems.

This can be closed out (though its sort of confusing that Items are in CfgWeapons still, but are handled entirely differently now and prior code still sorta but doesn't work with it... Very confusing).

closing on Nou's request