Difference between revisions of "GetEntityName"
From Nomad DB
(Created page with "This function returns the name of the specified entity. == Syntax == <pre> GetEntityName(entityId) </pre> * '''entityId''': ID of the target entity. * '''Returns''': Name of...") |
SpeckBomber (talk | contribs) |
||
(4 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
− | + | {{Page_WD2}} | |
+ | Retrieves the name from an [[Entity|entity]]. | ||
== Syntax == | == Syntax == | ||
− | < | + | <syntaxhighlight lang="lua"> |
GetEntityName(entityId) | GetEntityName(entityId) | ||
− | </ | + | </syntaxhighlight> |
− | * '''entityId''': ID of the target entity | + | * '''entityId''' (string): [[EntityId|ID]] of the target entity |
− | * '''Returns''': Name of the specified entity | + | * '''Returns''' (string): Name of the specified entity |
== Example == | == Example == | ||
− | < | + | <syntaxhighlight lang="lua"> |
local entityName = GetEntityName(GetLocalPlayerEntityId()) | local entityName = GetEntityName(GetLocalPlayerEntityId()) | ||
print(entityName) -- returns "player.MainCharacter.PawnPlayer.Aiden2" | print(entityName) -- returns "player.MainCharacter.PawnPlayer.Aiden2" | ||
− | </ | + | </syntaxhighlight> |
== Related Pages == | == Related Pages == |
Latest revision as of 20:44, 27 October 2020
Retrieves the name from an entity.
Syntax
GetEntityName(entityId)
- entityId (string): ID of the target entity
- Returns (string): Name of the specified entity
Example
local entityName = GetEntityName(GetLocalPlayerEntityId())
print(entityName) -- returns "player.MainCharacter.PawnPlayer.Aiden2"