(info) Other great resources: Official JS API docs, Scripting Forum

newGroup()

Create a new droid group...

 

Syntax

var returnValue = newGroup();

Parameters

This function does not have any parameters.

Return value

ValueTypeNotesGame version
<groupID>NumberThe unique ID for the newly created group.3.1 Beta 1

Example

Create a new group
var myGroup = newGroup(); // create a new group, storing it's ID in "myGroup"
 
function eventDroidBuilt(droid, structure) {
  groupAddDroid(myGroup, droid);
  console(groupSize(myGroup));
}
Availability 3.1 B1+

Requires:

  • Warzone 3.1 Beta 1 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:

Remove things from them:

  • Put them in some other group

Count objects in them:

List them:

Retrieve their objects:

Monitor them:

Remove them:

  • not currently possible