createGroup: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|SYNTAX= |p21=" to "|SYNTAX2= |p21=")
Line 18: Line 18:
____________________________________________________________________________________________
____________________________________________________________________________________________


'''createGroup''' side |SYNTAX=
[[createGroup]] side |SYNTAX=


|p1= side: [[Side]] |PARAMETER1=
|p1= side: [[Side]] |PARAMETER1=
Line 24: Line 24:
| [[Group]] |RETURNVALUE=
| [[Group]] |RETURNVALUE=


| s2='''createGroup''' [side, deleteWhenEmpty]        (''since Arma 3 v1.67'') |SYNTAX2=
|s2= [[createGroup]] [side, deleteWhenEmpty]        (''since Arma 3 v1.67'') |SYNTAX2=


|p21=  [side, deleteWhenEmpty]: [[Array]] |PARAMETER21=
|p21=  [side, deleteWhenEmpty]: [[Array]] |PARAMETER21=
|p22= side: [[Side]] |PARAMETER22=
|p22= side: [[Side]] |PARAMETER22=
|p23= deleteWhenEmpty: [[Boolean]] - [[true]] if delete this group [[deleteGroupWhenEmpty|when empty]]. Default: [[false]] (Note that it may take up to a minute for the group to get deleted) |PARAMETER3=


|r2= [[Group]] |RETURNVALUE=
|p23= deleteWhenEmpty: [[Boolean]] - [[true]] if delete this group [[deleteGroupWhenEmpty|when empty]]. Default: [[false]] (Note that it may take up to a minute for the group to get deleted) |PARAMETER23=
 
|r2= [[Group]] |RETURNVALUE2=
____________________________________________________________________________________________
____________________________________________________________________________________________
   
   
|x1= <code>_group = '''createGroup''' [[east]]</code> |EXAMPLE1=
|x1= <code>_group = [[createGroup]] [[east]]</code> |EXAMPLE1=
|x2= <code>_group = '''createGroup''' <nowiki>[</nowiki>[[east]], [[true]]];</code> |EXAMPLE1=
 
|x2= <code>_group = [[createGroup]] <nowiki>[</nowiki>[[east]], [[true]]];</code> |EXAMPLE2=
____________________________________________________________________________________________
____________________________________________________________________________________________


| [[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]] |SEEALSO=
}}
}}


Line 46: Line 48:


<dd class="notedate">Posted on December 15, 2006 - 21:30
<dd class="notedate">Posted on December 15, 2006 - 21:30
<dt class="note">'''[[User:ColonelSandersLite|ColonelSandersLite]]'''
<dt class="note">[[User:ColonelSandersLite|ColonelSandersLite]]
<dd class="note">
<dd class="note">
<br>The group limit is 144 groups groups per side.  If you attempt to create a group, and there is no room for another, it simply doesn't create, and it doesn't error.<br>
<br>The group limit is 144 groups groups per side.  If you attempt to create a group, and there is no room for another, it simply doesn't create, and it doesn't error.<br>
Line 52: Line 54:


<dd class="notedate">Posted on July 10,2007
<dd class="notedate">Posted on July 10,2007
<dt class="note">'''[[User:5133p39|5133p39]]'''
<dt class="note">[[User:5133p39|5133p39]]
<dd class="note">
<dd class="note">
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.
In '''{{arma}}''', 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.




<dd class="notedate">Posted on January 04, 2011
<dd class="notedate">Posted on January 04, 2011
<dt class="note">'''[[User:kju|kju]]'''
<dt class="note">[[User:kju|kju]]
<dd class="note">
<dd class="note">
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.
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.
Line 68: Line 70:
<h3 style="display:none">Bottom Section</h3>
<h3 style="display:none">Bottom Section</h3>


[[Category:Scripting Commands|CREATEGROUP]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands OFP Elite |CREATEGROUP]]
[[Category:Scripting Commands OFP Elite|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA|CREATEGROUP]]
[[Category:Scripting Commands ArmA|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_Groups|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_Object_Manipulation|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_Groups|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_Object_Manipulation|{{uc:{{PAGENAME}}}}]]

Revision as of 14:48, 3 September 2019

-wrong parameter ("Arma") defined!-1.00
Hover & click on the images for description

Description

Description:
Creates a new Group for the given Side. An HQ (center) for that side must already be in the Mission.sqm or have been initialized with createCenter. For the available sides see Side.

NOTES
  • The default limit of groups created per side was 144. Since Arma 3 v1.67 it is increased to 288.
  • Since Arma 3 v 1.67 it is possible to mark created group for automatic deletion when the group becomes empty (see Alt Syntax). When group is set to be automatically deleted when empty, when group becomes empty it may take up to a minute for it to get deleted.

Arma 3
In Arma 3 when last unit leaves its group, the group usually gets immediately auto deleted, regardless of whether or not if it was set for auto deletion manually
Groups:
Uncategorised

Syntax

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

Alternative Syntax

Syntax:
createGroup [side, deleteWhenEmpty]        (since Arma 3 v1.67)
Parameters:
[side, deleteWhenEmpty]: Array
side: Side
deleteWhenEmpty: Boolean - true if delete this group when empty. Default: false (Note that it may take up to a minute for the group to get deleted)
Return Value:
Group

Examples

Example 1:
_group = createGroup east
Example 2:
_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 December 15, 2006 - 21:30
ColonelSandersLite

The group limit is 144 groups groups per side. If you attempt to create a group, and there is no room for another, it simply doesn't create, and it doesn't error.
Posted on July 10,2007
5133p39
In Arma, 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