Skip to content

GetObjectsByClass

Read objects by class from current game state.

GetObjectsByClass(unitClass)

Inputs: unitClass is an integer unit class ID.

Output: Array matching a class.

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.