# Drag-and-Drop Inventory System

## Overview

The Drag-and-Drop Inventory System, is an add-on system for implementing visual "Drag and drop" inventories into your project. An "Inventory" in this sense can be anything that holds items on a visual grid, where each item has a physical height and width value that it uses on the grid.

Players can "pick up", move and drop objects in various ways, including with other inventories, passing objects from player to player, or even throwing them into the 3D world.

Designed to be highly flexible, the system functionality are built in and made available to you. This module does not force you to change your project to fit its structure, beyond adopting the use of a visual inventory, so some additional coding will be required to integrate the Inventory module into your project.&#x20;

{% hint style="info" %}
The `PanelManager` script has a toggle for `Show Debug Messages` which will toggle on or off the built in `Debug.Log` messages in the scripts. The console messages should help you isolate locations in the scripts where key events happen. This is intended to help you modify the scripts to suit your project, and add additional logic that is required for your game.
{% endhint %}

## [General Setup](/magic-pig-games/game-modules-4/game-module-systems/inventory/setup.md)

To make use of the Drag-and-Drop Inventory System, some setup is required.&#x20;

Refer to the Party Based RPG demo game for reference and examples.&#x20;

{% hint style="success" %}
If you are using `GameModulesActor` as the base class for your Actor class, switch to `GameModulesInventoryActor` instead! The "Inventory" version inherits from `GameModulesActor`, and adds additional methods to work with the Drag-and-Drop Inventory System.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://infinitypbr.gitbook.io/magic-pig-games/game-modules-4/game-module-systems/inventory.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
