Condition_CanAddObjectTemplateToBag
Description
Checks whether a TemplateObject-type item (randomly selected) can be added to the inventory.
Note
S1 must be a valid ObjectTemplateId defined in Object.json. All object IDs associated with the template are validated before checking inventory capacity.
Parameters
| Parameter | Description |
|---|---|
| BaseObject | The inventory owner to check |
| S1 | The ObjectTemplateId from Object.json for the item to be added |
| F1 | The number of items to add (minimum: 1) |
Examples
| Description | BaseObject | Command |
|---|---|---|
| Check if a template food item can be added to Self's inventory | Self | CanAddObjectTemplateToBag |
| Check if a template item can be added to Target's inventory | Target | CanAddObjectTemplateToBag |
| Check if 2 template items can be added to Self's inventory | Self | CanAddObjectTemplateToBag |
Back to Command FinderSearch and filter all 491 Script Condition documents