Dota 2 Workshop Tools/Scripting/API/CEntities.FindByClassnameWithin: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
Line 11: Line 11:


== Parameters ==
== Parameters ==
{| class="standard-table" style="width: 50%;"
{| class="standard-table" style="width: 100%;"
! Type
! Type
! Name
! Name
! Description
! Description
! Example
|-
|-
| handle
| handle
| startFrom
| startFrom
| No Description Set
| The last found unit, used to iterate through all units in area
| x/nil
|-
|-
| string
| string
| className
| className
| No Description Set
| The class of entity you are looking for
| "ent_dota_tree"
|-
|-
| Vector
| Vector
| origin
| origin
| No Description Set
| The center of the area to search around
| keys.caster:GetAbsOrigin()
|-
|-
| float
| float
| maxRadius
| maxRadius
| No Description Set
| The radius in dota distance that you want to search
| 1000
|}
|}



Revision as of 09:29, 17 August 2014

Note.pngNote: This page is automatically generated. Any changes may be overwritten

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