Skip to main content

Execute_CleanUpNearby

Description

Cleans up (despawns) nearby carriable objects around the BaseObject within a specified radius. Uses the AOI system to gather nearby GameObjects, filters to eligible CarriableObjects, and destroys those matching the requested cleanup type (S1). Properly detaches grouped objects from their parent before destruction. Objects currently in interactions or held by a character are excluded.

Parameters

ParameterDescription
BaseObjectThe actor used as the cleanup origin (location and floor level)
S1Cleanup target type (EB1CleanUpObjectType). Defaults to All if omitted or invalid
F1Cleanup radius in cm. Must be > 0

Examples

DescriptionBaseObjectCommandS1F1
Remove all eligible clutter within 500cm radiusSelfCleanUpNearbyAll500
Remove only Trash type objects within 800cm radiusSelfCleanUpNearbyTrash800