Skip to main content

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

ParameterDescription
BaseObjectThe inventory owner to check
S1The ObjectTemplateId from Object.json for the item to be added
F1The number of items to add (minimum: 1)

Examples

DescriptionBaseObjectCommand
Check if a template food item can be added to Self's inventorySelfCanAddObjectTemplateToBag
Check if a template item can be added to Target's inventoryTargetCanAddObjectTemplateToBag
Check if 2 template items can be added to Self's inventorySelfCanAddObjectTemplateToBag