Index

GetUnitsByType

GetUnitsByType(<-unitType <-builtState) ->units

Description

Returns a list of units of the specified unitType1) and builtState, ordered2) from lowest to highest UID.

builtState is an int (either 0,1,2). 0 = ignore built state. 1 = Only find units that are built. 2 = Only find units that are not built.

Examples

GetUnitsByType("Tower" 1) ->units

Index

1)
Any of the core unit types or the GUID of a custom unit.
2)
The unit within this list with the lowest/smallest UID (first ever created unit of its type) will always be located at the first index (if it qualifies for the builtState). The unit with the highest/greatest UID (last created unit of its type) will always be at the last index (if it qualifies for the builtState).