A group created with createGroup will get a waypoint at [0,0,0]. When you use createUnit to fill it with units, it will get an additional waypoint at the position the first unit is created. This new waypoint will also be set as currentWaypoint. However keep these two waypoints in mind when you do some scripting involving this groups' waypoints.
Description
Creates a new Group for the given Side. Using this command if the group limit is reached will return grpNull. The new Group exists globally, but it's locality is where this command was executed.
| Game | Operation Flashpoint v1.00 | Operation Flashpoint: Elite v1.00 | Armed Assault v1.00 | Arma 2 v1.00 | Arma 2: Operation Arrowhead v1.50 | Take On Helicopters v1.00 | Arma 3 v1.00 | Arma 3 v1.68 |
| Group auto-deletion | ✗ | ✓ | ||||||
| Group limit per side | 63 | 144 | 288 |
Important
- Groups can only be created for the west/blufor, opfor/east, independent/resistance, civilian and sideLogic sides - any other side will return grpNull
- Before Arma 3, a Side center must exist before group creation (either by having editor-placed units or createCenter usage)
Note
Arma 3: - createCenter usage is not needed anymore as all centers are automatically created.
- When the last unit leaves its group, the group usually gets immediately auto-deleted, regardless of its auto-deletion setting.
Syntax
Syntax 1
createGroup side
Parameters:
side: Side
Returns: Group - grpNull if the group limit is reached
Syntax 2
since arma3 1.68
createGroup [side, deleteWhenEmpty]
Parameters:
side: SidedeleteWhenEmpty: Boolean - true to delete the group when empty.
Returns: Group - grpNull if the group limit is reached
Examples
Example 1
private _group = createGroup east;
Example 2
private _group = createGroup [east, true];
See also
deleteGroup · deleteGroupWhenEmpty · isGroupDeletedWhenEmpty · group · setGroupId · groupID · units · groupFromNetId · netId · leader · selectLeader · join · createCenter · createUnit · createVehicle · Side
Community notes
New group is local to the machine that executed the command (A3 2.08.149102):
player addAction ["Group Test (Dedicated Server)", {
[[], {
_test = createGroup [west, true];
[str (local _test)] remoteExec ["hint", -2]; //tell all clients group locality; true
missionNamespace setVariable ["Group_Reference", _test, true]; //broadcast group reference to all players
}] remoteExec ["call", 2]; //create group on dedicated server only
sleep 1;
_newGroup = missionNamespace getVariable "Group_Reference"; //receive group reference from server
systemChat format ["Group local to player: %1", local _newGroup]; //false
}];