createGroup: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\|seealso= ?\[\[([^ ]+)\]\], \[\[([^ ]+)\]\]" to "|seealso= $1 $2")
m (Text replacement - "\|seealso= *\[\[([^ ]+)\]\], \[\[([^ ]+)\]\]" to "|seealso= $1 ")
Line 77: Line 77:
|x2= <code>[[private]] _group = [[createGroup]] [<nowiki/>[[east]], [[true]]];</code>
|x2= <code>[[private]] _group = [[createGroup]] [<nowiki/>[[east]], [[true]]];</code>


|seealso= [[deleteGroup]] [[deleteGroupWhenEmpty]] [[isGroupDeletedWhenEmpty]], [[group]], [[setGroupId]], [[groupID]], [[units]], [[groupFromNetId]], [[netId]], [[leader]], [[selectLeader]], [[join]], [[createCenter]], [[createUnit]], [[createVehicle]], [[Side]]
|seealso= [[deleteGroup]] [[deleteGroupWhenEmpty]] [[isGroupDeletedWhenEmpty]] [[group]], [[setGroupId]], [[groupID]], [[units]], [[groupFromNetId]], [[netId]], [[leader]], [[selectLeader]], [[join]], [[createCenter]], [[createUnit]], [[createVehicle]], [[Side]]
}}
}}



Revision as of 14:27, 20 January 2022

Hover & click on the images for description

Description

Description:
Creates a new Group for the given Side. Using this command if 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
Group auto-deletion Unchecked Checked
Group limit per side 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 - 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:
deleteGroup deleteGroupWhenEmpty isGroupDeletedWhenEmpty groupsetGroupIdgroupIDunitsgroupFromNetIdnetIdleaderselectLeaderjoincreateCentercreateUnitcreateVehicleSide

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
kju - c
Posted on Jan 04, 2011 - 10:19 (UTC)
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.