Difference between revisions of "EntityId"

From Nomad DB
m
 
Line 1: Line 1:
 +
{{Page_WD2}}{{Page_WDL}}
 
Every [[Entity|entity]] that exists in the game world has a unique '''entity ID'''. It is a 64-bit unsigned integer, represented in Lua as a string. This also applies when multiple instances of the same entity exist simultaneously. Additionally, entity IDs are dynamic, meaning that an entity that is always being spawned, like the local player, will have a different ID each time the game is run. An exception to this are entities inside [[World Loading Unit|WLUs]] as they have pre-defined IDs.
 
Every [[Entity|entity]] that exists in the game world has a unique '''entity ID'''. It is a 64-bit unsigned integer, represented in Lua as a string. This also applies when multiple instances of the same entity exist simultaneously. Additionally, entity IDs are dynamic, meaning that an entity that is always being spawned, like the local player, will have a different ID each time the game is run. An exception to this are entities inside [[World Loading Unit|WLUs]] as they have pre-defined IDs.
  

Latest revision as of 20:35, 27 October 2020

Every entity that exists in the game world has a unique entity ID. It is a 64-bit unsigned integer, represented in Lua as a string. This also applies when multiple instances of the same entity exist simultaneously. Additionally, entity IDs are dynamic, meaning that an entity that is always being spawned, like the local player, will have a different ID each time the game is run. An exception to this are entities inside WLUs as they have pre-defined IDs.

Example

15738498423673481953

Invalid Entity ID

Some functions that return an entity ID might return one that is invalid. An entity ID can always be compared against GetInvalidEntityId to check whether it is valid or not.

Related Pages