Other great resources: Official JS API docs, Scripting Forum
Group Object
- Aubergine
Owned by Aubergine
A group of Game objects...
Â
Properties
Property | Type | Notes | Availability |
---|---|---|---|
id | Number | The group ID. You can retrieve the objects in the group using enumGroup(). | 3.2+ |
type | Constant | GROUP | 3.2+ |
Notes
Group objects are currently only defined in labels.ini and are only accessible via the getObject() function.
Example
var attackers = enumGroup( getObject("AttackGroup").id );
Availability 3.2+
Requires:
- Warzone 3.2 or above
Contents
Jump to:
Scripting: Groups
Related Objects:
 Create them:
- newGroup() – create a new group
- WZ 3.2+ – add to a group that doesn't exist yet
- labels.ini – group map-placed objects
Add things to them:
- groupAdd() – add any Game object
- groupAddDroid() – add a Droid object
- groupAddArea() – add Game objects within an area of the map
Remove things from them:
- Put them in some other group
Count objects in them:
- groupSize() – get number of items in a group
- groupSizes[] – iterate group sizes
List them:
- groupSizes[] – elements are group ids
- getObject() – retrieve a group by its label
Retrieve their objects:
- enumGroup() – retrieve objects in a group
Monitor them:
- eventGroupLoss() – triggers when an object is removed from a group
Remove them:
- not currently possible
Â