Versions Compared

Key

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

Create a new droid group...

 

Syntax

Code Block
themeRDark
languagejavascript
linenumberstrue
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

Code Block
themeRDark
languagejavascript
titleCreate a new group
linenumberstrue
var myGroup = newGroup(); // create a new group, storing it's ID in "myGroup"
 
function eventDroidBuilt(droid, structure) {
  groupAddDroid(myGroup, droid);
  console(groupSize(myGroup));
}
Div
classbox
Availability
Status
colourGreen
title3.1 b1+

Requires:

  • Warzone 3.1 Beta 1 or above

See also

Related articles:

  • groupAddDroid() – add a single droid to a group
  • groupAddArea() – add all droids within a specific map area to a group
  • Groups – quick reference for groups
  • groupSize() – count the number of droids in a group
    Div
    classbox
    Contents

    Jump to:

    Table of Contents
    maxLevel5

    Div
    classbox

    Include Page
    .jslinks-groups
    .jslinks-groups