Skip to content

Clear Inventory

Clear Inventory

Removes all items of a specified type from the party's inventory.

Properties

System

Name Explanation Type
Item Type The item type to clear from the inventory. Only items matching the specified type will be removed. Variable or Value

Examples

Clear All Items of Type 0 from the Inventory

This removes all items matching item type 0 from the party's inventory.

clear_inventory(0);
{"Data":{"ItemType":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","VariableIndex":0,"Metadata":null},"Metadata":null},"TypeName":"MAR.Game.RPGCore.Models.Scripts.Commands.Inventory.ClearInventoryCommand"}

Clear Items by Type Stored in Local Variable 2

This removes all items matching the type stored in Local Variable 2 from the party's inventory.

clear_inventory($lv[2]);
{"Data":{"ItemType":{"IsGlobalVariable":false,"IsLocalVariable":true,"IsValue":false,"Value":"","VariableIndex":2,"Metadata":null},"Metadata":null},"TypeName":"MAR.Game.RPGCore.Models.Scripts.Commands.Inventory.ClearInventoryCommand"}