Class: Group#

Hierarchy#

Constructors#

constructor#

new Group(): Group

Returns: Group

Defined in: handles/group.ts:10

Properties#

handle#

• Readonly handle: group

Inherited from: Handle.handle

Defined in: handles/handle.ts:6

Accessors#

first#

first(): Unit

bug May return null even if there are still units in the group. This happens when a unit in the group dies and decays since the group still holds a reference to that unit but that unit is pretty much null. See http://wc3c.net/showthread.php?t=104464.

Returns: Unit

Defined in: handles/group.ts:100


id#

id(): number

Get the unique ID of the handle. The ID is recycled once you destroy the object.

Returns: number

The unique ID of a handle object.

Defined in: handles/handle.ts:18


size#

size(): number

Returns: number

Defined in: handles/group.ts:104

Methods#

addGroupFast#

addGroupFast(addGroup: Group): number

Parameters:#

NameType
addGroupGroup

Returns: number

Defined in: handles/group.ts:19


addUnit#

addUnit(whichUnit: Unit): boolean

Parameters:#

NameType
whichUnitUnit

Returns: boolean

Defined in: handles/group.ts:23


clear#

clear(): void

Returns: void

Defined in: handles/group.ts:27


destroy#

destroy(): void

Returns: void

Defined in: handles/group.ts:31


enumUnitsInRange#

enumUnitsInRange(x: number, y: number, radius: number, filter: boolexpr | function): void

Parameters:#

NameType
xnumber
ynumber
radiusnumber
filterboolexpr | () => boolean

Returns: void

Defined in: handles/group.ts:35


enumUnitsInRangeCounted#

enumUnitsInRangeCounted(x: number, y: number, radius: number, filter: boolexpr | function, countLimit: number): void

bug Causes irregular behavior when used with large numbers

Parameters:#

NameType
xnumber
ynumber
radiusnumber
filterboolexpr | () => boolean
countLimitnumber

Returns: void

Defined in: handles/group.ts:42


enumUnitsInRangeOfPoint#

enumUnitsInRangeOfPoint(whichPoint: Point, radius: number, filter: boolexpr | function): void

Parameters:#

NameType
whichPointPoint
radiusnumber
filterboolexpr | () => boolean

Returns: void

Defined in: handles/group.ts:46


enumUnitsInRangeOfPointCounted#

enumUnitsInRangeOfPointCounted(whichPoint: Point, radius: number, filter: boolexpr | function, countLimit: number): void

bug Causes irregular behavior when used with large numbers

Parameters:#

NameType
whichPointPoint
radiusnumber
filterboolexpr | () => boolean
countLimitnumber

Returns: void

Defined in: handles/group.ts:53


enumUnitsInRect#

enumUnitsInRect(r: Rectangle, filter: boolexpr | function): void

Parameters:#

NameType
rRectangle
filterboolexpr | () => boolean

Returns: void

Defined in: handles/group.ts:57


enumUnitsInRectCounted#

enumUnitsInRectCounted(r: Rectangle, filter: boolexpr | function, countLimit: number): void

bug Causes irregular behavior when used with large numbers

Parameters:#

NameType
rRectangle
filterboolexpr | () => boolean
countLimitnumber

Returns: void

Defined in: handles/group.ts:64


enumUnitsOfPlayer#

enumUnitsOfPlayer(whichPlayer: MapPlayer, filter: boolexpr | function): void

note In contrast to other Enum-functions this function enumarates units with locust.

Parameters:#

NameType
whichPlayerMapPlayer
filterboolexpr | () => boolean

Returns: void

Defined in: handles/group.ts:71


enumUnitsOfType#

enumUnitsOfType(unitName: string, filter: boolexpr | function): void

Parameters:#

NameType
unitNamestring
filterboolexpr | () => boolean

Returns: void

Defined in: handles/group.ts:75


enumUnitsOfTypeCounted#

enumUnitsOfTypeCounted(unitName: string, filter: boolexpr | function, countLimit: number): void

bug Causes irregular behavior when used with large numbers

Parameters:#

NameType
unitNamestring
filterboolexpr | () => boolean
countLimitnumber

Returns: void

Defined in: handles/group.ts:82


enumUnitsSelected#

enumUnitsSelected(whichPlayer: MapPlayer, filter: boolexpr | function): void

Parameters:#

NameType
whichPlayerMapPlayer
filterboolexpr | () => boolean

Returns: void

Defined in: handles/group.ts:86


for#

for(callback: function): void

Parameters:#

NameType
callback() => void

Returns: void

Defined in: handles/group.ts:90


getUnitAt#

getUnitAt(index: number): Unit

Parameters:#

NameType
indexnumber

Returns: Unit

Defined in: handles/group.ts:114


getUnits#

getUnits(): Unit[]

Returns: Unit[]

Defined in: handles/group.ts:108


hasUnit#

hasUnit(whichUnit: Unit): boolean

Parameters:#

NameType
whichUnitUnit

Returns: boolean

Defined in: handles/group.ts:118


orderCoords#

orderCoords(order: string | number, x: number, y: number): void

Parameters:#

NameType
orderstring | number
xnumber
ynumber

Returns: void

Defined in: handles/group.ts:122


orderImmediate#

orderImmediate(order: string | number): void

Parameters:#

NameType
orderstring | number

Returns: void

Defined in: handles/group.ts:130


orderPoint#

orderPoint(order: string | number, whichPoint: Point): void

Parameters:#

NameType
orderstring | number
whichPointPoint

Returns: void

Defined in: handles/group.ts:138


orderTarget#

orderTarget(order: string | number, targetWidget: Widget | Unit): void

Parameters:#

NameType
orderstring | number
targetWidgetWidget | Unit

Returns: void

Defined in: handles/group.ts:146


removeGroupFast#

removeGroupFast(removeGroup: Group): number

Parameters:#

NameType
removeGroupGroup

Returns: number

Defined in: handles/group.ts:154


removeUnit#

removeUnit(whichUnit: Unit): boolean

Parameters:#

NameType
whichUnitUnit

Returns: boolean

Defined in: handles/group.ts:158


fromHandle#

static fromHandle(handle: group): Group

Parameters:#

NameType
handlegroup

Returns: Group

Defined in: handles/group.ts:162


getEnumUnit#

static getEnumUnit(): Unit

Returns: Unit

Defined in: handles/group.ts:166


getFilterUnit#

static getFilterUnit(): Unit

Returns: Unit

Defined in: handles/group.ts:170