User Tools

Site Tools


item_storage_slot

This is an old revision of the document!


Item Storage Slot


An item storage slot is a widget element for storing an item or stack of items. This is useful for inventory windows, item container windows, or other widgets that are meant for storing items into for later retrieval and usage.

Element Properties

IconPropertyDescription
Element IDID for the item storage slot. This ID must be unique amongst other elements within the same widget. It is currently auto-generated but will be editable in a future update.

Scripting

You can access certain properties of an item storage slot from within a script by simply referencing the parent widget and the element by their unique IDs. See below for examples of retrieving the slot's item. In this case, the widget has an ID of “test” and the item storage slot has an ID of “0001”.

Retrieving the item data for a item storage slot:

$item_id = widget["test"].element["0001"].item.id;
$item_count = widget["test"].element["0001"].item.count
item_storage_slot.1606942622.txt.gz · Last modified: 2020/12/02 12:57 by justin