Skip to main content

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

ParameterDescription
BaseObjectThe inventory owner entity whose children are searched
CompareTypeEqual (any child matches the state) / NotEqual (any child does not match the state)
S1State Group ID to check
S2State ID to check within the state group

Examples

DescriptionBaseObjectCommandCompareTypeS1S2
Check if any inventory item is in the Normal stateSelfHasInInventoryStateEqualNormalNormal
Check if any inventory item is not in the Normal stateSelfHasInInventoryStateNotEqualNormalNormal
Check if any child of Target is in the Broken stateTargetHasInInventoryStateEqualNormalBroken