Dota 2 Workshop Tools/Scripting/API/CEntities.FindByClassnameWithin: Difference between revisions
< Dota 2 Workshop Tools | Scripting | API
Jump to navigation
Jump to search
Line 11: | Line 11: | ||
== Parameters == | == Parameters == | ||
{| class="standard-table" style="width: | {| class="standard-table" style="width: 100%;" | ||
! Type | ! Type | ||
! Name | ! Name | ||
! Description | ! Description | ||
! Example | |||
|- | |- | ||
| handle | | handle | ||
| startFrom | | startFrom | ||
| | | The last found unit, used to iterate through all units in area | ||
| x/nil | |||
|- | |- | ||
| string | | string | ||
| className | | className | ||
| | | The class of entity you are looking for | ||
| "ent_dota_tree" | |||
|- | |- | ||
| Vector | | Vector | ||
| origin | | origin | ||
| | | The center of the area to search around | ||
| keys.caster:GetAbsOrigin() | |||
|- | |- | ||
| float | | float | ||
| maxRadius | | maxRadius | ||
| | | The radius in dota distance that you want to search | ||
| 1000 | |||
|} | |} | ||
Revision as of 09:29, 17 August 2014

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