Versions Compared
compared with
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Excerpt |
---|
An array of group sizes... |
Syntax
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
var size = groupSizes[groupID]; |
Properties
ParameterProperty | Type | Mandatory | Description | Game version |
---|---|---|---|---|
groupID | Number | The ID of the droid group. This ID is generated when you create a new group using newGroup(). | 3.2 |
Return value
Value | Type | Description | Game verison |
---|---|---|---|
<size> | Number | The number of droids in the group. | 3.2 |
undefined | Undefined | The group did not exist. | 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 | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
groupSizes.forEach( function get(groupSize, groupID) { // do stuff } ); |
Div | ||
---|---|---|
| ||
For Warzone 3.1, use groupSize() function instead (it also works on WZ 3.2+). |
Div | ||||||
---|---|---|---|---|---|---|
| ||||||
Availability
Requires:
|
Div | ||||
---|---|---|---|---|
| ||||
ContentsJump to:
|
Div | ||
---|---|---|
| ||
See AlsoRelated articles:
|