Script:inventory addfromscene: Difference between revisions

From Arx Libertatis Wiki
Jump to navigation Jump to search
(Created page with "{{ScriptCommandPage |description=add an existing item to the inventory |context=any |parameters= item entity ID of the entity to add to the calling entity's inventory |intro=The item must exist in the current area or this command will have no effect. The item will be combined into existing stacks in the calling entity's inventory if possible which may result in the original item being destroyed. If the calling inventory did not have an inventory created with {{Command|i...")
 
mNo edit summary
Line 10: Line 10:
To create a new item instead of adding an existing one use {{Command|inventory add}} or {{Command|inventory addmulti}}.
To create a new item instead of adding an existing one use {{Command|inventory add}} or {{Command|inventory addmulti}}.


To add an item to the inventory of a non-player entity use {{Command|inventory playeraddfromscene}}, {{Command|inventory playeradd}} or {{Command|inventory playeraddmulti}} instead.
To add an item to the [[player]] inventory use {{Command|inventory playeraddfromscene}}, {{Command|inventory playeradd}} or {{Command|inventory playeraddmulti}} instead.
}}
}}

Revision as of 11:02, 19 June 2022

The inventory addfromscene script command is used to add an existing item to the inventory for an entity. The item must exist in the current area or this command will have no effect.

The item will be combined into existing stacks in the calling entity's inventory if possible which may result in the original item being destroyed. If the calling inventory did not have an inventory created with inventory create, if the item does not fit into the inventory or if it is not an item that can be put into inventories then it is dropped in front of the player instead.

To create a new item instead of adding an existing one use inventory add or inventory addmulti.

To add an item to the player inventory use inventory playeraddfromscene, inventory playeradd or inventory playeraddmulti instead.

Usage

inventory addfromscene <item>

Context: Any Entity

Parameters:

ParameterTypeDescription
item entity ID of the entity to add to the calling entity's inventory