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
| Parameter | Description |
|---|---|
| BaseObject | The parent entity whose hierarchy children are counted |
| CompareType | Supported compare types: Equal, NotEqual, Less, Greater, LessOrEqual, GreaterOrEqual |
| S1 | Filter type: {EntityTag}, {ObjectTags}, {GameObjectDetailType}, {StateGroup}, {StateName} |
| S2 | Comparison value for the S1 filter (tag name, object tag, detail type, state group ID, or state ID) |
| F1 | Reference count to compare against the number of found children |
Examples
| Description | BaseObject | Command | CompareType | S1 | S2 | F1 |
|---|---|---|---|---|---|---|
| Does Target have 2 or more children tagged "Door"? | Target | NumberOfChildObject | GreaterOrEqual | {EntityTag} | Door | 2 |
| Does Self have exactly 0 children with ObjectTag "Furniture"? | Self | NumberOfChildObject | Equal | {ObjectTags} | Furniture | 0 |
| Does Target have at least 1 child in StateGroup "Garbage"? | Target | NumberOfChildObject | GreaterOrEqual | {StateGroup} | Garbage | 1 |
Back to Command FinderSearch and filter all 491 Script Condition documents