selene.entities

Provides access to entities and the ability to create new ones.
PropertyTypeDescription
SteppedOnTile
Fired when an entity steps on a tile.
SteppedOffTile
Fired when an entity steps off a tile.
Function
Create(entityDef: string): Entity
Create(entityDef: EntityDefinition): Entity
Creates a new entity from an entity definition. The entity will be saved and synchronized with clients.
CreateTransient(entityDef: string): Entity | nil
CreateTransient(entityDef: EntityDefinition): Entity | nil
Creates a new transient entity from an entity definition. Transient entities are not assigned a network id - spawning them is fire-and-forget.
GetByNetworkId(networkId: number): Entity | nil
Retrieves an entity by its network ID. Returns the entity if found, otherwise returns nil.