SetEntityData
Stores a value on a world entity, private to the server.
Any Lua value; gone with the entity and on a reload. For a value the clients read use SetEntityState.
Syntax
Section titled “Syntax”SetEntityData(id, key, value)| Parameter | Type | |
|---|---|---|
id |
number | the entity |
key |
string | the key |
value |
any | the value; nil removes the key |
Returns
Section titled “Returns”boolean - false when there is no such entity
Example
Section titled “Example”local id = CreatePickup("longSwordDuel", x, y, z)SetEntityData(id, "owner", winner)See also
Section titled “See also”GetEntityData · SetEntityState · SetZoneData · the Storage and persistence group of the index
