createGroup: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Fix A2 → A2OA)
m (Text replacement - "\| *s([0-9]) *=([^ ]+) *\{\{Since\|(.+)\|([0-9]\.[0-9][02468])[^ ]+\}\} " to "|s$1= $2 |s$1since= $3 $4 ")
Line 57: Line 57:
|r1= [[Group]] - [[grpNull]] if the group limit is reached
|r1= [[Group]] - [[grpNull]] if the group limit is reached


|s2= [[createGroup]] [side, deleteWhenEmpty] {{Since|arma3|1.68|y}}
|s2= [[createGroup]] [side, deleteWhenEmpty]
 
|s2since= arma3 1.68


|p21= side: [[Side]]
|p21= side: [[Side]]

Revision as of 22:37, 10 August 2021

Hover & click on the images for description

Description

Description:
Creates a new Group for the given Side. Using this command while the group limit is reached will return grpNull.
Game Logo A0.png1.00 ofpe logo.png1.00 Logo A1 black.png1.00 Logo A2.png1.00 A2 OA Logo.png1.50 tkoh logo small.png1.00 Arma 3 logo black.png1.00 Arma 3 logo black.png1.68
Max. Nb. of Groups 63 144 288
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.
Groups:
Groups

Syntax

Syntax:
createGroup side
Parameters:
side: Side
Return Value:
Group - grpNull if the group limit is reached

Alternative Syntax

Syntax:
createGroup [side, deleteWhenEmpty]
Parameters:
side: Side
deleteWhenEmpty: Boolean - (Optional, default false) true to delete the group when empty.
  • If set to true, forces a group to get deleted when empty - it does not prevent its deletion by other commands when set to false.
  • Deletion may take up to a minute after the last unit is removed.
Return Value:
Group - grpNull if the group limit is reached

Examples

Example 1:
private _group = createGroup east;
Example 2:
private _group = createGroup [east, true];

Additional Information

See also:
deleteGroupdeleteGroupWhenEmptyisGroupDeletedWhenEmptygroupsetGroupIdgroupIDunitsgroupFromNetIdnetIdleaderselectLeaderjoincreateCentercreateUnitcreateVehicleSide

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
Posted on July 10, 2007
5133p39
In Armed Assault, empty groups are not automatically deleted - if you created 144 groups, you will not be able to create new group even if all units in all those groups died, because all the 144 groups still exists - you will have to delete some groups manually.
Posted on January 04, 2011
kju
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.