Condition_NumberOfObject
Description
Compares the number of game objects within the specified distance around the BaseObject against a reference count, applying an optional filter by tag, type, or state.
Parameters
| Parameter | Description |
|---|---|
| BaseObject | The reference entity around which game objects are searched (Self or Target) |
| 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 | Search radius distance from BaseObject |
| F2 | Reference count to compare against the number of found objects |
Examples
| Description | BaseObject | Command | CompareType | S1 | S2 | F1 | F2 |
|---|---|---|---|---|---|---|---|
| Are there 2 or more objects tagged "Door" within 200 units? | Self | NumberOfObject | GreaterOrEqual | {EntityTag} | Door | 200 | 2 |
| Are there exactly 0 objects tagged "Furniture" within 300 units? | Target | NumberOfObject | Equal | {ObjectTags} | Furniture | 300 | 0 |
| Is there at least 1 object of type "Prop" within 500 units? | Self | NumberOfObject | GreaterOrEqual | {GameObjectDetailType} | Prop | 500 | 1 |
| Are there fewer than 3 objects in StateGroup "Open" within 400 units? | Target | NumberOfObject | Less | {StateGroup} | Open | 400 | 3 |
Back to Command FinderSearch and filter all 491 Script Condition documents