Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Excerpt

An array of group sizes...

 

Syntax

Code Block
themeRDark
languagejavascript
linenumberstrue
var size = groupSizes[groupID];
Parameters

Properties

ParameterPropertyTypeMandatoryDescriptionGame version
groupIDNumber(tick)

The ID of the droid group.

This ID is generated when you create a new group using newGroup().

3.2

Return value

The group did not exist
ValueTypeDescriptionGame verison
<size>NumberThe number of droids in the group.3.2
undefinedUndefined

.

3.2

Notes

See important notes regarding changes to groups in Warzone 3.2.

The groupSizes global is a "sparse" array – that means there might be gaps in the numbering of it's elements. As such, it's recommended to use the forEach() method when iterating the array (see example below).

Example

Code Block
themeRDark
languagejavascript
titleIterating through the groupSizes array...
linenumberstrue
groupSizes.forEach( function get(groupSize, groupID) {
	// do stuff
} );

 

 

Div
classsuggest box

For Warzone 3.1, use groupSize() function instead (it also works on WZ 3.2+).

Div
classbox
Availability
Status
colourYellow
title3.2+

Requires:

  • Warzone 3.2 and above.
Div
classbox
Contents

Jump to:

Table of Contents
maxLevel5

Div
classbox

See Also

Related articles: