Condition_HasInInventoryState
Description
Checks if any child in the BaseObject's inventory satisfies the specified state condition. Returns true if at least one child matches the state (Equal), or if at least one child does not match the state (NotEqual).
Parameters
| Parameter | Description |
|---|---|
| BaseObject | The inventory owner entity whose children are searched |
| CompareType | Equal (any child matches the state) / NotEqual (any child does not match the state) |
| S1 | State Group ID to check |
| S2 | State ID to check within the state group |
Examples
| Description | BaseObject | Command | CompareType | S1 | S2 |
|---|---|---|---|---|---|
| Check if any inventory item is in the Normal state | Self | HasInInventoryState | Equal | Normal | Normal |
| Check if any inventory item is not in the Normal state | Self | HasInInventoryState | NotEqual | Normal | Normal |
| Check if any child of Target is in the Broken state | Target | HasInInventoryState | Equal | Normal | Broken |
Back to Command FinderSearch and filter all 491 Script Condition documents