Skip to content

GetObjectsByType

Read objects by type from current game state.

GetObjectsByType(objectType)

Inputs: objectType is an integer UnitObjectType ID.

Output: Array of matching objects.

Errors and unavailable states: Wrong scalar argument types can raise a Lua argument error. This call has no separate error return; an empty array gives no usable matches from this read.

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