Skip to reading
PCA Script Programming

remove_inventory()

Edition 0.86.4.1 HF1

0.86.4.1 Hotfix 1 edition. Earlier lessons and screenshots retain their original version context; revised references and supplements describe the newer behavior.

Download PDFView PDF page

Remove Inventory | Action ID: RemoveInventory

Remove copies of an item through the current inventory route.

Source table from remove_inventory(), page 83
Option key / fieldMeaning and accepted inputDefault
Item itemIdChoose an inventory definition ID.Blank
Count countNumber of copies or repetitions. Use a whole number.1

Timing. The call waits for its runtime routine to return; no additional completion wait is promised by this schema.

Code example
remove_inventory({"itemId": "key", "count": 1})

In use. Remove one fuse after it has successfully been installed. Test the condition first, then remove it. Removing a missing item is not a substitute for a Has Inventory branch, and the next action in an ordinary list will still run.

change_inventory_quantity()#

Change Inventory Quantity | Action ID: ChangeInventoryQuantity

Apply a signed quantity change to an item for a character.

Source table from remove_inventory(), page 83
Option key / fieldMeaning and accepted inputDefault
Player / Character characterIdChoose a Character Designer ID; player is a runtime alias where supported.Blank
Inventory Item itemIdChoose an inventory definition ID.Blank
Change By amountSigned quantity change: positive adds, negative removes.1

Timing. The call waits for its runtime routine to return; no additional completion wait is promised by this schema.

Code example
change_inventory_quantity({"characterId": "player", "itemId": "key", "amount": 1})

In use. Use amount -1 to consume a battery, or +3 to grant three coins. This is a change by an amount, not an instruction to set an absolute total. Choose the same owner that the inventory GUI is displaying.

Page 83 of 357Permalink
Go to page