User Tools

Site Tools


assign_entity_id

Assign Entity ID


Assigns an ID to the specified entity. An empty string value can be specified for the ID in order to remove the entity's ID.

Signature:

assign_entity_id(entity, entity_id)
ArgumentDescriptionTypeRequired
entityEntity that will be assigned the ID.EntityYes
entity_idUnique ID that the entity will be assigned.StringYes
Return ValueDescriptionType
ResultReturns true if the ID was successfully assigned to the entity, false otherwise.Boolean

Entity IDs are case-sensitive and must be unique among other entities within the same map.

Example:

assign_entity_id(tile[random(2, 5), 0, 0], "trap_tile");

Results: Assigns an ID of “trap_tile” to a random tile along coordinates (2, 0, 0) through (5, 0, 0).


Editor Node:

assign_entity_id.txt · Last modified: 2023/01/02 21:26 by justin