Skip to reading
PCA Script Programming

transfer_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

Change Inventory from Player to Player | Action ID: TransferInventory

Move a quantity from one character's inventory to another.

Source table from transfer_inventory(), page 84
Option key / fieldMeaning and accepted inputDefault
From Player fromCharacterIdChoose a Character Designer ID; player is a runtime alias where supported.Blank
To Player toCharacterIdChoose a Character Designer ID; player is a runtime alias where supported.Blank
Inventory Item itemIdChoose an inventory definition ID.Blank
Quantity 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
transfer_inventory({"fromCharacterId": "", "toCharacterId": "", "itemId": "key"})

In use. Transfer the key from Ivo to Elias in a game with individual bags. Check the source character and quantity before playing a handover animation. Changing which character is controlled is not the same thing as transferring an item.

Page 84 of 357Permalink
Go to page