Skip to main content

Condition_NumberOfChildObject

Description

Compares the number of hierarchy child objects of the BaseObject against a reference count, applying an optional filter by tag, type, or state.

Parameters

ParameterDescription
BaseObjectThe parent entity whose hierarchy children are counted
CompareTypeSupported compare types: Equal, NotEqual, Less, Greater, LessOrEqual, GreaterOrEqual
S1Filter type: {EntityTag}, {ObjectTags}, {GameObjectDetailType}, {StateGroup}, {StateName}
S2Comparison value for the S1 filter (tag name, object tag, detail type, state group ID, or state ID)
F1Reference count to compare against the number of found children

Examples

DescriptionBaseObjectCommandCompareTypeS1S2F1
Does Target have 2 or more children tagged "Door"?TargetNumberOfChildObjectGreaterOrEqual{EntityTag}Door2
Does Self have exactly 0 children with ObjectTag "Furniture"?SelfNumberOfChildObjectEqual{ObjectTags}Furniture0
Does Target have at least 1 child in StateGroup "Garbage"?TargetNumberOfChildObjectGreaterOrEqual{StateGroup}Garbage1