# Create a Stackable Item and Pickup

> For the complete documentation index, see [llms.txt](llms.txt).

Make a bandage pickup that gives three bandages at a time. Two pickups should give the player a stack of five and a second stack of one. Start with an empty [slot-based bag](inv-guide-simple-grid.html) or [spatial backpack](inv-guide-spatial-grid.html) with room for two stacks.

Procedure: Define the stack

1. Create or open Item_Bandage. Add a Container Placement Fragment and a User Interface Fragment with a name and icon. For a spatial bag, also add a one-by-one Dimensions Fragment.

2. Add a Stack and Quantity Fragment. Set Stack Limit to five, Maximum Quantity to at least six, and enable Allow Stack Merge. The pickup's starting quantity is a separate setting.

Procedure: Place two pickups in the level

1. Create a Blueprint based on `NinjaInventoryPickupActor` and give it a visible mesh. It already includes a pickup component and a sphere that collects on pawn overlap. Make sure the player's collision generates overlap events with the sphere.

2. On the inherited pickup component, choose Initial Items for Item Source. Add Item_Bandage to Pickup Items. In that entry's Initial Fragment Data, select the stack fragment, add Stack Memory, and set Stack Size to three. Enable Destroy Owner When Fully Consumed if the empty pickup should disappear.

3. Place two copies far enough apart to collect them separately. If your game uses a button to collect items, use an actor with a pickup component and call `TryGrantItems` on the server from the confirmed action. See [Interaction and Inventory](integration-interaction-inventory.html) for the Collect setup.

## Give a Pickup Its Own Behavior

For a custom pickup, implement `IInventoryPickupInterface`. Return its remaining entries from `GetPickupItemDefinitions` and accept replacement entries in `SetPickupDefinitions`. Give the actor to the player's manager with `AddItemsFromPickupActor`. In `HandlePickupResults`, subtract each entry's Consumed Amount. A full bag may accept nothing, and a nearly full stack may accept only part of the pickup. The built-in pickup component does this bookkeeping. Bind its `OnFullyConsumed` event for a depletion effect.

## Try It in Play

Walk over the first pickup and check for three bandages. Collect the second and check for stacks of five and one. To test a partial grant, repeat with only one free slot in the bag and no existing bandages. The first pickup fills three places in the stack. The second tops it up to five and keeps one bandage in the world. Free a slot, leave the sphere, and walk back to collect the last bandage.

