Fields

Name
Type
Comments
hasResources
Boolean
True if this object has any resources that have been mined and just sitting in the inventory.
isPlayer
Boolean
True if this living object is a player, false if this living object is an NPC.
name
String
Gets the name of the current living object.
owner
Gets the owner of the current living object. Always null for a player.

Methods

Name
Return Type
Parameters
Comments
onCreate
-
Called when the living object is created. Only called once per lifetime.
onHeartbeat
-
deltaTime: Number
Called every 0.5 seconds (500 miliseconds). The value for deltaTime is provided in seconds.
onMessage
-
sender: String
message: String
Called when a living object receives a message.
onResume
-
dataStore: DataStore
Called when a living object will be brought back into existence.
onSuspend
-
dataStore: DataStore
Called when a living object will be suspended from existence.
setName
-
name: String
Sets the name of the current living object.