Execute_AddObjectTemplateToBag
Description
Creates a random item from the specified ObjectTemplate group and adds it to the bag.
Note
One item is randomly selected from all objects belonging to the given ObjectTemplateId and added to the bag. For example, ServedFood04_Template may include ServedRamen01 or ServedDumpling01, and one is picked at random.
Parameters
| Parameter | Description |
|---|---|
| BaseObject | The inventory owner that will receive the item |
| S1 | The ObjectTemplateId from Object.json for the template group to pick from |
| F1 | The number of items to add (minimum: 1) |
Examples
| Description | BaseObject | Command |
|---|---|---|
| Add 1 random item from a food template to Self's bag | Self | AddObjectTemplateToBag |
| Add 2 random items from a food template to Target's bag | Target | AddObjectTemplateToBag |
| Add 1 random item from a template to Self's bag | Self | AddObjectTemplateToBag |
Back to Command FinderSearch and filter all 399 Script Execution documents