Condition_IsInInventoryCount
Description
Checks how many entities are in the inventory.
Parameters
| Parameter | Description |
|---|---|
| BaseObject | The object to be checked for the condition |
| CompareType | Equal, NotEqual, Greater, Less, GreaterOrEqual, LessOrEqual, InRange, OutRange |
| S1 | Object.json Id to filter by (optional; if omitted, counts all items) |
| F1 | Quantity threshold to compare against |
| F2 | Upper quantity threshold (InRange, OutRange only) |
Examples
| Description | BaseObject | Command | CompareType |
|---|---|---|---|
| Check if inventory contains 5 or more objects | Self | IsInInventoryCount | GreaterOrEqual |
| Check if inventory contains 2 or more of a specific object | Self | IsInInventoryCount | GreaterOrEqual |
| Check if inventory contains between 5 and 10 objects | Self | IsInInventoryCount | InRange |
| Check if Target’s inventory has fewer than 3 objects | Target | IsInInventoryCount | Less |
Back to Command FinderSearch and filter all 491 Script Condition documents