createGroup: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[Category:[ _]?Scripting[ _]Commands[ _]Arma[ _]3(\|.*)]]" to "{{GameCategory|arma3|Scripting Commands}}")
m (Text replacement - "\[\[Category:[ _]?Scripting[ _]Commands[ _]Arma[ _]2(\|.*)]]" to "{{GameCategory|arma2|Scripting Commands}}")
Line 76: Line 76:
[[Category:Scripting Commands OFP Elite|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands OFP Elite|{{uc:{{PAGENAME}}}}]]
{{GameCategory|arma1|Scripting Commands}}
{{GameCategory|arma1|Scripting Commands}}
[[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]]
{{GameCategory|arma2|Scripting Commands}}
{{GameCategory|arma3|Scripting Commands}}
{{GameCategory|arma3|Scripting Commands}}
[[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]]

Revision as of 00:23, 8 January 2021

Hover & click on the images for description

Description

Description:
Creates a new Group for the given Side.
  • Groups can only be created for the west/blufor, opfor/east, independent/resistance, civilian and sideLogic sides.
  • The default limit of groups per side is 288 since Arma 3 v1.67 (144 before and in previous titles).
  • Using a wrong side or trying to create a group when the groups limit is reached will fail silently and return grpNull.
  • Before Arma 3 a Side center must exist before group creation (either by having editor-placed units or createCenter usage).
Arma 3
  • When the last unit leaves its group, the group usually gets immediately auto-deleted, regardless of its auto-deletion setting.
  • Usage of createCenter in Arma 3 is not required anymore as all centers are automatically created.
Groups:
Groups

Syntax

Syntax:
createGroup side
Parameters:
side: Side
Return Value:
Group

Alternative Syntax

Syntax:
createGroup [side, deleteWhenEmpty] Template:since
Parameters:
[side, deleteWhenEmpty]: Array
side: Side
deleteWhenEmpty: Boolean - (Optional, default false) true to delete delete the group when empty.
  • If set to true, deleteWhenEmpty 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

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

Notes

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.

Bottom Section