Skip to content

GetObjectById

Read object by id from current game state.

GetObjectById(objectId)

Inputs: objectId is an integer object ID.

Output: Object, or nil.

Errors and unavailable states: Wrong argument types can raise a Lua argument error. Unavailable game data or an invalid target returns nil as described in Output.

See Game data and world for related calls and usage notes.