👾Entity
Last updated
Last updated
CEntity
.CEntity
is base class for all entities in the game e.g. CNPC
, Hero
, CPlayer
, CAbility
CEntity
): boolean
Name | Type | Description |
---|---|---|
Returns true
if the entity is in entity list. Search in unordered set.
CEntity
): boolean
Name | Type | Description |
---|---|---|
Returns true
if the entity is in NPC list. Search in unordered set.
CEntity
): boolean
Name | Type | Description |
---|---|---|
Returns true
if the entity is in hero list. Search in unordered set.
CEntity
): boolean
Returns true
if the entity is in player list. Search in unordered set.
CEntity
): boolean
Returns true
if the entity is in ability list. Search in unordered set. Item is ability.
Not the same as Entities.Get(index). See example.
Returns entity by game index.
CEntity
): integer
Returns game index of entity.
CEntity
): string
Returns the entity's class name.
CEntity
): string
Returns the entity's name.
CEntity
): string
Returns the entity's designerName field.
CEntity
): Enum.TeamNum
Returns the entity's team number.
Returns true
if the entities are in the same team.
Returns the entity's position.
Returns the entity's rotation.
CEntity
): boolean
Returns true
if the entity is alive.
CEntity
): boolean
Returns true
if the entity is not visible to the local player.
CEntity
): integer
Returns the entity's health.
CEntity
): integer
Returns the entity's max health.
Returns the entity's owner or nil
if the entity has no owner.\ e.g. for CPlayer
-> npc_dota_hero_ember_spirit
-> npc_dota_hero_ember_spirit_fire_remnant
ownership chain Entity.GetOwner(remnant)
will return Ember Spirit's entity.
Returns true
if the entity is owned by another entity-owner. It will check the first owner only.
Returns the entity's last owner.\ e.g. for CPlayer
-> npc_dota_hero_ember_spirit
-> npc_dota_hero_ember_spirit_fire_remnant
ownership chain Entity.GetOwner(remnant)
will return CPlayer
.
Returns true
if the entity is owned by another entity-owner. It will check the whole ownership chain.
CEntity
, radius: number
, teamType [?]
: Enum.TeamType
, skipIllusions [?]
: boolean
): CHero[]
Returns an array of all alive and visible heroes in radius of the entity. Exclude illusion.
CEntity
, radius: number
, teamType [?]
: Enum.TeamType
, skipIllusions [?]
: boolean
): CNPC[]
Returns an array of all alive and visible NPCs in radius of the entity.
Active means that tree is not destroyed.
Returns an array of all not temporary trees in radius of the entity.
Temporary trees are trees planted by abilities or items.
Returns an array of all temporary trees in radius of the entity.
Returns true
if entity is controllable by player.
Returns position in front of entity or (0,0,0) if entity is invalid.
CEntity
): integer
Returns entity class id. Could be as a optimized way to check entity type.
Returns value of the field.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|