Skip to main content

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

ParameterDescription
BaseObjectThe reference entity around which game objects are searched (Self or Target)
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)
F1Search radius distance from BaseObject
F2Reference count to compare against the number of found objects

Examples

DescriptionBaseObjectCommandCompareTypeS1S2F1F2
Are there 2 or more objects tagged "Door" within 200 units?SelfNumberOfObjectGreaterOrEqual{EntityTag}Door2002
Are there exactly 0 objects tagged "Furniture" within 300 units?TargetNumberOfObjectEqual{ObjectTags}Furniture3000
Is there at least 1 object of type "Prop" within 500 units?SelfNumberOfObjectGreaterOrEqual{GameObjectDetailType}Prop5001
Are there fewer than 3 objects in StateGroup "Open" within 400 units?TargetNumberOfObjectLess{StateGroup}Open4003