Dota 2 Workshop Tools/Scripting/API/CEntities.FindByClassnameWithin
< Dota 2 Workshop Tools | Scripting | API
Jump to navigation
Jump to search

Function Description
handle FindByClassnameWithin(handle startFrom, string className, Vector origin, float maxRadius)
Find entities by class name within a radius. Pass nil to start an iteration, or reference to a previously found entity to continue a search
Parameters
Type | Name | Description | Example |
---|---|---|---|
handle | startFrom | The last found unit, used to iterate through all units in area | x/nil |
string | className | The class of entity you are looking for | "ent_dota_tree" |
Vector | origin | The center of the area to search around | keys.caster:GetAbsOrigin() |
float | maxRadius | The radius in dota distance that you want to search | 1000 |
Returns
handle - The handle to the found unit